From 9f8df3cc4c058aca2ab1c7dde179f6dec2b8c014 Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Sun, 25 Jan 2026 22:39:58 +0100 Subject: [PATCH 1/2] Add logic to release action to set version. --- .github/workflows/publish.yml | 39 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6dac7e2..f250a43 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,21 +18,17 @@ jobs: - uses: actions/setup-node@v5 with: node-version: 22 + - name: Set version from release tag + run: | + VERSION=${GITHUB_REF#refs/tags/v} + echo "Setting version to $VERSION" + npm version $VERSION --no-git-tag-version - name: install dependencies run: npm install - name: publish run: npm run publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Linux artifacts - uses: softprops/action-gh-release@v2 - with: - files: | - out/make/deb/**/*.deb - out/make/rpm/**/*.rpm - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - publish_for_mac: runs-on: macos-latest @@ -41,19 +37,17 @@ jobs: - uses: actions/setup-node@v5 with: node-version: 22 + - name: Set version from release tag + run: | + VERSION=${GITHUB_REF#refs/tags/v} + echo "Setting version to $VERSION" + npm version $VERSION --no-git-tag-version - name: install dependencies run: npm install - name: publish run: npm run publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload macOS artifact to release - uses: softprops/action-gh-release@v2 - with: - files: | - out/make/*.dmg - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish_for_win: runs-on: windows-latest @@ -62,17 +56,14 @@ jobs: - uses: actions/setup-node@v5 with: node-version: 22 + - name: Set version from release tag + run: | + VERSION=${GITHUB_REF#refs/tags/v} + echo "Setting version to $VERSION" + npm version $VERSION --no-git-tag-version - name: install dependencies run: npm install - name: publish run: npm run publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Windows artifacts - uses: softprops/action-gh-release@v2 - with: - files: | - out/make/squirrel.windows/**/*.exe - out/make/msi/**/*.msi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ee3d42763f072e578d0cf9d9e5012c01bc755b60 Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Sun, 25 Jan 2026 22:45:47 +0100 Subject: [PATCH 2/2] Change version setting from git tag to release name. --- .github/workflows/publish.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f250a43..bac289e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,11 +18,9 @@ jobs: - uses: actions/setup-node@v5 with: node-version: 22 - - name: Set version from release tag + - name: Set version from release name run: | - VERSION=${GITHUB_REF#refs/tags/v} - echo "Setting version to $VERSION" - npm version $VERSION --no-git-tag-version + npm version "${{ github.event.release.name }}" --no-git-tag-version - name: install dependencies run: npm install - name: publish @@ -37,11 +35,9 @@ jobs: - uses: actions/setup-node@v5 with: node-version: 22 - - name: Set version from release tag + - name: Set version from release name run: | - VERSION=${GITHUB_REF#refs/tags/v} - echo "Setting version to $VERSION" - npm version $VERSION --no-git-tag-version + npm version "${{ github.event.release.name }}" --no-git-tag-version - name: install dependencies run: npm install - name: publish @@ -56,11 +52,9 @@ jobs: - uses: actions/setup-node@v5 with: node-version: 22 - - name: Set version from release tag + - name: Set version from release name run: | - VERSION=${GITHUB_REF#refs/tags/v} - echo "Setting version to $VERSION" - npm version $VERSION --no-git-tag-version + npm version "${{ github.event.release.name }}" --no-git-tag-version - name: install dependencies run: npm install - name: publish