-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.33 KB
/
ci.yaml
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
46
47
48
49
50
name: 'CI'
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Lint'
run: make lint
build:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- name: 'Build dist bundle'
run: make dist
- id: vars
run: echo "::set-output name=distpath::$(make distpath)"
- name: 'Upload dist bundle to artifacts'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.vars.outputs.distpath }}
path: ${{ steps.vars.outputs.distpath }}
- name: 'Generate SHA256 checksum files'
run: sha256sum ${{ steps.vars.outputs.distpath }} > ${{ steps.vars.outputs.distpath }}.sha256
- name: 'Upload SHA256 checksum files to artifacts'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.vars.outputs.distpath }}.sha256
path: ${{ steps.vars.outputs.distpath }}.sha256
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: 'Download build artifacts'
uses: actions/[email protected]
with:
path: artifacts
- name: 'Create new release'
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: ${{ contains(github.ref, '-') }}
files: |
artifacts/*/*