From e0abeeb469afeeccd06a8fb3d5b35403fc078ae1 Mon Sep 17 00:00:00 2001 From: Anwar Date: Sun, 8 Feb 2026 21:10:45 +0100 Subject: [PATCH] Update GitHub Actions workflow for release process --- .github/workflows/release.yml | 45 +++++++---------------------------- 1 file changed, 9 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43007de..c6124b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,54 +7,27 @@ on: jobs: release: - name: Version & Publish runs-on: ubuntu-latest - permissions: contents: write + pull-requests: write id-token: write steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 - registry-url: "https://registry.npmjs.org/" - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Version packages with Changesets - run: npx changeset version + registry-url: https://registry.npmjs.org/ - - name: Commit version bump and changelog - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "chore: version bump" - git push + - run: npm ci + - run: npm run build - - name: Get package version - id: get-version - run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 + - name: Create Release Pull Request or Publish + uses: changesets/action@v1 with: - tag_name: v${{ steps.get-version.outputs.VERSION }} - name: v${{ steps.get-version.outputs.VERSION }} - body_path: ./CHANGELOG.md + publish: npm run release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish to npm - run: npx changeset publish - env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}