-
Notifications
You must be signed in to change notification settings - Fork 9
83 lines (71 loc) · 2.36 KB
/
publish_executables.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: publish executables
on:
push:
branches: [main]
tags: ["v*"]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout backend repository
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.21
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: setup web console repository
run: ./scripts/setup_web_console.sh
- name: cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
- name: build web console
run: ./scripts/build_web_console.sh
env:
TX_TOKEN: '${{ secrets.TRANSIFEX_TOKEN_MC_V2 }}'
- name: Cache go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: build bundles
run: ./scripts/generate_executables.sh
- name: create build timestamp and sha file
run: |
cd builds
echo `date -u +'%Y%m%d%H%M%S'` > ./build_timestamp.txt
echo `date -u +'%Y-%m-%dT%H:%M:%S%:z'` >> ./build_timestamp.txt
sha256sum *.tar.gz > ./SHA256SUMS.txt
sha256sum *.zip >> ./SHA256SUMS.txt
- name: Update release notes and executables
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') # executes only for new release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
files: |
builds/*.tar.gz
builds/*.zip
builds/build_timestamp.txt
builds/SHA256SUMS.txt
- name: Update executables from main branch changes
if: startsWith(github.ref, 'refs/heads/main') # executes only for changes in main
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GH_TOKEN }}"
automatic_release_tag: development
prerelease: true
title: "Development Build - Pre Release"
files: |
builds/*.tar.gz
builds/*.zip
builds/build_timestamp.txt
builds/SHA256SUMS.txt