Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/release-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
Expand Down Expand Up @@ -66,7 +64,8 @@ jobs:
git push origin "v${{ steps.package.outputs.version }}"

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: release
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -82,18 +81,19 @@ jobs:
with:
node-version: '22.14.0'
registry-url: 'https://registry.npmjs.org'
- name: Verify tag matches package version
run: |
test "v$(node -p "require('./package.json').version")" = "$GITHUB_REF_NAME"
- name: Read package metadata
id: package
run: |
echo "name=$(node -p "require('./package.json').name")" >> "$GITHUB_OUTPUT"
echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
- name: Verify release tag exists
run: |
git fetch --tags origin
git rev-parse "v${{ steps.package.outputs.version }}" >/dev/null 2>&1
- run: bun install --frozen-lockfile
- name: Create GitHub release from changelog
run: |
gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 || bunx changelogen gh release --token "$GITHUB_TOKEN"
gh release view "v${{ steps.package.outputs.version }}" >/dev/null 2>&1 || bunx changelogen gh release "v${{ steps.package.outputs.version }}" --token "$GITHUB_TOKEN"
env:
GITHUB_TOKEN: ${{ github.token }}
- run: bun run build
Expand Down
Loading