Merge pull request #33 from adobe-commerce/fix-lang #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Run version command | |
| run: npx changeset version | |
| - name: Check for changes | |
| id: check | |
| run: | | |
| if git diff --quiet; then | |
| echo "No version changes detected" | |
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit | |
| if: steps.check.outputs.has_changes == 'true' | |
| run: | | |
| git add -A | |
| git commit -m "chore: bump version" | |
| - name: Run changeset tag | |
| if: steps.check.outputs.has_changes == 'true' | |
| run: npx changeset tag | |
| - name: Push commit and tags | |
| if: steps.check.outputs.has_changes == 'true' | |
| run: | | |
| git push origin HEAD | |
| git push --tags |