forked from vmware-archive/octant
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (68 loc) · 1.99 KB
/
nightly.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Nightly releases
on:
schedule:
- cron: '0 0 * * *'
jobs:
nightly-build:
name: Build nightly
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Build web assets
run: |
go run build.go web-build
- uses: actions/upload-artifact@v2
with:
name: bundle
path: web/dist
- name: Build electron binary
env:
GOFLAGS: -mod=vendor
run: |
go run build.go build-electron
- name: Build electron
uses: samuelmeuli/action-electron-builder@v1.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_root: 'web'
build_script_name: 'build-electron'
- uses: google-github-actions/upload-cloud-storage@main
with:
credentials: ${{ secrets.GOOGLE_APP_JSON }}
path: web/release
destination: octant-nightlies/electron
push:
name: Run goreleaser
needs: [nightly-build]
runs-on: ubuntu-latest
container: goreleaser/goreleaser:v0.174.2
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: bundle
path: web/dist
- name: Run goreleaser
run: |
git fetch --tags
git tag -d nightly || :
git tag nightly
echo "$GOOGLE_APPLICATION_JSON" > /tmp/gs.json
goreleaser -f .goreleaser-nightly.yml --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_APPLICATION_JSON: ${{ secrets.GOOGLE_APP_JSON }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gs.json