diff --git a/.gitea/workflows/build-on-tag.yml b/.gitea/workflows/build-on-tag.yml index 42b0788..c5f461b 100644 --- a/.gitea/workflows/build-on-tag.yml +++ b/.gitea/workflows/build-on-tag.yml @@ -25,20 +25,21 @@ jobs: run: bun run build - name: Get version from package.json + id: pkg run: | VERSION=$(node -p "require('./package.json').version") - echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Create git tag run: | git config user.name "gitea-actions[bot]" git config user.email "gitea-actions[bot]@users.noreply.gitea.com" - git tag $VERSION - git push --force origin $VERSION + git tag ${{ steps.pkg.outputs.version }} + git push --force origin ${{ steps.pkg.outputs.version }} - name: Create GitHub release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ $VERSION }} + tag_name: ${{ steps.pkg.outputs.version }} files: | dist/index.js