-
Notifications
You must be signed in to change notification settings - Fork 45
33 lines (31 loc) · 946 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
name: build
on:
release:
types: [created]
jobs:
build:
environment: automated-release
runs-on: ubuntu-latest
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 and test
run: |
npm i
npm run test
- run: zip -r release.zip src index* CHANGELOG.md LICENSE package-lock.json package.json README.md schema*
- 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 }}