Skip to content

Commit

Permalink
chore: automate post-release
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
  • Loading branch information
jrandolf and OrKoN committed May 19, 2022
1 parent ea47ff0 commit c7f6b85
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .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:
Expand All @@ -11,6 +8,7 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions: read-all
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -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 '<noreply@github.com>'
git add -A
git commit -m "chore: bump version to ${{ steps.post-version.outputs.VERSION }}"
git push

0 comments on commit c7f6b85

Please sign in to comment.