-
Notifications
You must be signed in to change notification settings - Fork 38
35 lines (33 loc) · 1004 Bytes
/
release.yml
File metadata and controls
35 lines (33 loc) · 1004 Bytes
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
name: release
on:
release:
types: [created]
jobs:
build:
environment: automated-release
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
steps:
- uses: actions/checkout@v2
- name: Add config details
run: |
git config --global user.name ${{secrets.NAME}}
git config --global user.email ${{secrets.EMAIL}}
- name: Move release to draft
run: gh release edit $TAG_NAME --draft=true
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Run npm install, build and test
run: |
npm i
npm run build
npm run test
npm run lint
- run: zip -r release.zip lib *.md LICENSE SECURITY.md package.json package-lock.json -x 'lib/test/*' 'lib/src/*'
- name: Upload production artifacts
run: |
gh release upload $TAG_NAME "release.zip#release"
gh release edit $TAG_NAME --draft=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}