chore(deps): update dependabot/fetch-metadata action to v3 (#35) #76
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 | |
| workflow_dispatch: | |
| concurrency: | |
| group: release | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| name: Semantic Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PAT }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Validate | |
| run: pnpm run validate | |
| - name: Semantic Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT }} | |
| run: npx semantic-release | |
| - name: Update major version tag | |
| if: success() | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT }} | |
| run: | | |
| LATEST_TAG=$(git describe --tags --abbrev=0) | |
| MAJOR_VERSION=$(echo $LATEST_TAG | cut -d. -f1) | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -fa $MAJOR_VERSION -m "Update $MAJOR_VERSION to $LATEST_TAG" | |
| git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git $MAJOR_VERSION --force |