From 27e7ed31c7b82f42abbe7edf5dda9c361529750e Mon Sep 17 00:00:00 2001 From: Marshall Peterson Date: Tue, 31 Oct 2023 11:51:39 -0600 Subject: [PATCH] build: update version in package.json when publishing --- .github/workflows/publish-library.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/publish-library.yml b/.github/workflows/publish-library.yml index 3fddd9e40..cdd33069e 100644 --- a/.github/workflows/publish-library.yml +++ b/.github/workflows/publish-library.yml @@ -27,9 +27,19 @@ jobs: - name: Update Package Version run: | + # Update the version in package.json tag=${{ steps.extract_tag.outputs.tag }} sed -i "s/\"version\": \".*\"/\"version\": \"$tag\"/" package.json + # Commit the changes + git config user.name "GitHub Actions" + git config user.email "actions@users.noreply.github.com" + git add package.json + git commit -m "Update package version to $tag" + git push + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Install Dependencies run: yarn install