-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (40 loc) · 1.11 KB
/
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
37
38
39
40
41
42
43
44
45
name: Release
on:
create:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
registry-url: https://npm.pkg.github.com/
scope: '@drawbotics'
- name: Install dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}}
- name: Generate Changelog
if: "!contains(github.ref, 'beta')"
run: |
npx auto changelog --dry-run | grep -vE "lerna notice|lerna success|New Release Notes" > ${{ github.workflow }}-CHANGELOG.md
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Pre-release
uses: softprops/action-gh-release@v1
if: "contains(github.ref, '-')"
with:
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: "!contains(github.ref, 'beta')"
with:
body_path: ${{ github.workflow }}-CHANGELOG.md
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}