Skip to content

chore(deps): update dependabot/fetch-metadata action to v3 (#35) #76

chore(deps): update dependabot/fetch-metadata action to v3 (#35)

chore(deps): update dependabot/fetch-metadata action to v3 (#35) #76

Workflow file for this run

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