v5.0.2 #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, build and test | |
run: | | |
npm i | |
npm run test | |
npm run lint | |
- run: zip -r lib.zip . -x '.*' 'node_modules/*' 'src/*' 'spec/*' | |
- name: Upload production artifacts | |
run: | | |
gh release upload $TAG_NAME "lib.zip#build" | |
gh release edit $TAG_NAME --draft=false | |
env: | |
TAG_NAME: ${{ github.event.release.tag_name }} |