From 6e9dc69fa27e9dc8cbf714474a090f8d20a6689e Mon Sep 17 00:00:00 2001 From: Arne Roomann-Kurrik Date: Sat, 30 Aug 2025 13:59:04 -0700 Subject: [PATCH 1/2] fix: fix publish triggers --- .github/workflows/publish.yml | 4 ++-- .github/workflows/release.yml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 24dd066..9278a25 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,13 +2,13 @@ name: Publish to npm on: release: - types: [published, released, created] + types: [published, released, created, edited] workflow_dispatch: jobs: publish: runs-on: ubuntu-latest - + steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41cacf2..b0a810f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: if: github.actor == github.repository_owner permissions: contents: write - + steps: - name: Checkout code uses: actions/checkout@v4 @@ -54,11 +54,11 @@ jobs: npm version ${{ github.event.inputs.version_type }} --no-git-tag-version NEW_VERSION=$(node -p "require('./package.json').version") echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT - + # Commit the version change git add package.json package-lock.json git commit -m "chore: bump version to v$NEW_VERSION" - + # Create and push tag git tag "v$NEW_VERSION" git push origin main @@ -71,7 +71,7 @@ jobs: --notes "## Changes See the [changelog](https://github.com/${{ github.repository }}/compare/v${{ steps.version.outputs.new_version }}...HEAD) for details. - + **Full Changelog**: https://github.com/${{ github.repository }}/commits/v${{ steps.version.outputs.new_version }}" env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 542e4ee691adac7201c190799c51594978cd0923 Mon Sep 17 00:00:00 2001 From: Arne Roomann-Kurrik Date: Sat, 30 Aug 2025 14:02:55 -0700 Subject: [PATCH 2/2] fix: explicitly trigger publish step --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0a810f..7f1ed5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,3 +75,8 @@ jobs: **Full Changelog**: https://github.com/${{ github.repository }}/commits/v${{ steps.version.outputs.new_version }}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Trigger npm publish + run: gh workflow run publish.yml + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file