chore: automate post-release

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
This commit is contained in:
jrandolf 2022-05-19 10:49:58 +02:00 committed by GitHub
parent ea47ff0766
commit c7f6b856ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,5 @@
name: publish-on-tag name: publish-on-tag
# Declare default permissions as read only.
permissions: read-all
on: on:
push: push:
tags: tags:
@ -11,6 +8,7 @@ on:
jobs: jobs:
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: read-all
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -37,3 +35,30 @@ jobs:
npm config set registry 'https://wombat-dressing-room.appspot.com/' npm config set registry 'https://wombat-dressing-room.appspot.com/'
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}' npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
npm publish 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