From d9b572f3c512847f1cd76a62b736346137fffddc Mon Sep 17 00:00:00 2001 From: KOMIYA Atsushi Date: Thu, 11 Jan 2024 16:46:09 +0900 Subject: [PATCH] Update publish workflow to include version tagging --- .github/workflows/publish.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 30d772d..250d1f1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -31,9 +31,15 @@ jobs: git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' - name: Bump version run: npm -w packages/bolt-s3 version ${{ inputs.target_element }} + - name: Get version string + id: get-version-string + run: echo "version=$(jq -r .version packages/bolt-s3/package.json)" >> "$GITHUB_OUTPUT" + - run: git add package-lock.json packages/bolt-s3/package.json + - run: git commit -m "v${{ steps.get-version-string.outputs.version }}" + - run: git tag "v${{ steps.get-version-string.outputs.version }}" - run: npm ci - run: make publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: git push - - run: git push --tags + - run: git push "v${{ steps.get-version-string.outputs.version }}"