From 87a5700e155ab3ef0fa7970d172d3303c97b4e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Zorro?= Date: Mon, 15 Jul 2024 14:32:32 -0500 Subject: [PATCH] fix(build): forced tag update after version bump --- .github/workflows/test-build.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 9e27196..deca21b 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -45,12 +45,14 @@ jobs: experimental: true - run: bun install - name: Bump version + id: bump run: | version=$(echo "${{ github.ref }}" | sed -e s%refs/tags/v%%) echo "New tag found. Updating package.json to $version..." jq --indent 4 --arg version "$version" '.version = $version' package.json > package.json.tmp mv package.json.tmp package.json bun biome format --write package.json + echo "version=$version" >> "$GITHUB_OUTPUT" - name: Update package.json version uses: stefanzweifel/git-auto-commit-action@v5 with: @@ -68,6 +70,13 @@ jobs: skip_checkout: false disable_globbing: true create_branch: false + - uses: rickstaa/action-create-tag@v1 + id: "tag_create" + with: + tag: v${{ steps.bump.outputs.version }} + tag_exists_error: false + force_push_tag: true + message: "Tag version" build: needs: bump-version if: always() @@ -97,8 +106,6 @@ jobs: runs-on: macos-14 steps: - uses: actions/checkout@v4 - with: - ref: main - name: Mise Tools install uses: jdx/mise-action@v2 with: