-
Notifications
You must be signed in to change notification settings - Fork 28
75 lines (65 loc) · 1.7 KB
/
nightly.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Nightly
on:
schedule:
- cron: "0 0 * * *"
jobs:
riotpot:
strategy:
matrix:
go-version: [1.18]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: latest
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build UI
run: npm --prefix=./ui ci && npm --prefix=./ui run build
- name: Build application
run: make build-all
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: riotpot
path: bin
if-no-files-found: error
release:
permissions:
contents: write
needs: riotpot
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
id: download
with:
path: artifacts
- name: Zip content
working-directory: artifacts
run: zip -r riotpot.zip riotpot
# Nightly
- name: Release Nightly
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: nightly
tag_name: nightly
files: artifacts/riotpot.zip
prerelease: true