From c7f6b856ab87c2e66713136a7fa0368c0e9a0374 Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Thu, 19 May 2022 10:49:58 +0200 Subject: [PATCH] chore: automate post-release Co-authored-by: Alex Rudenko --- .github/workflows/publish-on-tag.yml | 31 +++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-on-tag.yml b/.github/workflows/publish-on-tag.yml index 5ee91fb234823..9487bbf38d7dd 100644 --- a/.github/workflows/publish-on-tag.yml +++ b/.github/workflows/publish-on-tag.yml @@ -1,8 +1,5 @@ name: publish-on-tag -# Declare default permissions as read only. -permissions: read-all - on: push: tags: @@ -11,6 +8,7 @@ on: jobs: publish: runs-on: ubuntu-latest + permissions: read-all steps: - name: Checkout uses: actions/checkout@v3 @@ -37,3 +35,30 @@ jobs: npm config set registry 'https://wombat-dressing-room.appspot.com/' npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}' npm publish + + post-publish: + needs: publish + runs-on: ubuntu-latest + permissions: + actions: read|write + contents: read|write + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Append `-post` to version + id: post-version + run: | + npm version --no-git-tag-version --no-commit-hooks "$(jq -r .version ./package.json)-post" + echo ::set-output name=VERSION::$(jq -r .version ./package.json) + - name: Build + run: | + npm install + npm run build + npm run doc + - name: Commit and push + run: | + git config user.name 'Github' + git config user.email '' + git add -A + git commit -m "chore: bump version to ${{ steps.post-version.outputs.VERSION }}" + git push