Skip to content

Commit

Permalink
fix(build): forced tag update after version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro committed Jul 15, 2024
1 parent a689651 commit 87a5700
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 87a5700

Please sign in to comment.