-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1010 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Release
on:
push:
branches:
- production
jobs:
npm:
name: Publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
registry-url: "https://registry.npmjs.org/"
- name: Prepare
run: |
yarn --frozen-lockfile
yarn build
- name: Set released version to env
run: node -p -e '`RELEASED_PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- name: Create release draft on GitHub
uses: release-drafter/release-drafter@v5
with:
version: ${{ env.RELEASED_PACKAGE_VERSION }}
name: ${{ env.RELEASED_PACKAGE_VERSION }}
tag: ${{ env.RELEASED_PACKAGE_VERSION }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}