From 217a602064210c98ffac24371339f8a0ea0a450e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kr=C3=BChlmann?= Date: Tue, 6 Jan 2026 02:20:13 +0100 Subject: [PATCH] Use dynamic version --- .github/workflows/release.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9f254a..5f767aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,34 +1,29 @@ name: Manual Release - on: workflow_dispatch: - inputs: - version: - description: "Release version (must match package.json)" - required: true - prerelease: - description: "Mark as prerelease" - type: boolean - default: false - +permissions: + contents: write jobs: release: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Node uses: actions/setup-node@v4 with: node-version: 20 cache: npm - - name: Install deps run: npm ci - + - name: Ensure version is not already tagged + run: | + VERSION=$(node -p "require('./package.json').version") + if git rev-parse "v$VERSION" >/dev/null 2>&1; then + echo "Tag v$VERSION already exists. Bump version first." + exit 1 + fi - name: Build + publish env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}