chore: manual execution of release

The release step is now manually triggered and not with each merge to master.
This commit is contained in:
Enrico Stahn 2020-11-21 00:24:53 +11:00 committed by GitHub
parent 78a58981fa
commit a7d0c2c081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,33 @@
name: Release name: Release
on: [release] on: [workflow_dispatch]
jobs: jobs:
tag:
name: Tag
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v2.1.2
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Install semantic-release
run: yarn global add --no-progress --non-interactive "semantic-release" "@semantic-release/exec"
- name: Run semantic-release
run: $(yarn global bin)/semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/') # if: startsWith(github.ref, 'refs/tags/')
needs: [tag]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -29,6 +52,5 @@ jobs:
with: with:
version: latest version: latest
args: release --rm-dist args: release --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}