-
Notifications
You must be signed in to change notification settings - Fork 6
112 lines (94 loc) · 2.57 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Release
on:
push:
tags:
- '*'
jobs:
# This is a huuuuge hack and work around. As checkout@v3 cannot be used
# within the elm build (that one is based on an old Node8 docker image with
# an too git version. Therefore, we use a separate job to get all submodules,
# compress these files and extract them later in the elm build job.
clone-recursive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Initialize submodules in UI
run: |
cd ui
git submodule update --init --recursive
tar -czvf elm-mdc.tar.gz ./elm-mdc
- name: Archive Submodules
uses: actions/upload-artifact@v3
with:
name: elm-mdc
path: |
ui/elm-mdc.tar.gz
retention-days: 1
build-frontend:
needs: clone-recursive
runs-on: ubuntu-latest
container:
image: infomark/elm:0.19.0
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Download elm-mdc
uses: actions/[email protected]
with:
name: elm-mdc
- name: Extract artifact
run: |
cd ui
tar xvf ../elm-mdc.tar.gz
- name: Run build
run: |
cd ui
elm-app build
- name: Copy static assets
run: |
cp -r ui/build/* static
- name: Archive static files
uses: actions/upload-artifact@v3
with:
name: static-assets
path: |
static
retention-days: 1
build:
needs: build-frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Download static assets
uses: actions/[email protected]
with:
name: static-assets
path: static
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Fill in version
run: sed -i 's/"YXZ"/"${GITHUB_SHA}"/g' symbol/version.go
- name: Pack files
run: |
go install github.com/markbates/pkger/cmd/pkger
pkger list
pkger
- name: Build binary
run: |
go build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
# We do some UI building, making the git state dirty.
args: release --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}