ci: manual releases #194

Merged
mcataford merged 3 commits from manual-releases into master 2021-03-19 21:09:48 +00:00
2 changed files with 31 additions and 20 deletions
Showing only changes of commit 2299984afa - Show all commits

View file

@ -1,6 +1,6 @@
name: packwatch CI
on: [push, pull_request]
on: [pull_request]
jobs:
lint:
@ -49,22 +49,3 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: yarn --immutable
- run: yarn build
release:
name: Release
runs-on: ubuntu-latest
needs: [build, lint, test]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Node setup
uses: actions/setup-node@v1
with:
node-version: 14
- name: Prepare
run: yarn && yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release

30
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: packwatch release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
needs: [build, lint, test]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Node setup
uses: actions/setup-node@v1
with:
node-version: 14
- name: Prepare
run: yarn && yarn build
- name: get tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/v}
- name: Release
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn publish --access public --tag latest --new-version ${{steps.get_tag.outputs.tag}}