2022-03-10 01:32:29 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-03-10 21:55:35 +01:00
|
|
|
with:
|
|
|
|
ref: master # We have to checkout master or PNPM fails. Tag should be on master anyway.
|
2022-03-10 01:32:29 +01:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
|
|
with:
|
|
|
|
version: 6.27.1
|
|
|
|
run_install: true
|
2022-03-10 01:34:19 +01:00
|
|
|
- run: pnpm run build
|
2022-04-23 19:15:51 +02:00
|
|
|
- run: pnpm run prepublish-all
|
2022-03-10 01:32:29 +01:00
|
|
|
env:
|
|
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
2022-03-10 21:39:46 +01:00
|
|
|
commit_message: Release Version ${{ github.ref_name }}
|
|
|
|
branch: master
|
2022-03-10 21:48:43 +01:00
|
|
|
- run: git -c user.email="actions@github.com" -c user.name="GitHub Actions" tag -fa ${{ github.ref_name }} -m "${{ github.ref_name }}"
|
2022-03-10 21:52:31 +01:00
|
|
|
- run: git push -f origin ${{ github.ref_name }}
|
2022-04-23 19:15:51 +02:00
|
|
|
- run: npm publish --access public
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2022-03-10 01:32:29 +01:00
|
|
|
- run: pnpm -r publish --filter ./packages --access public
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|