-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (62 loc) · 2.16 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
name: Nightly
on:
push:
branches:
- 'master'
jobs:
nightly:
name: Deploy nightly
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
env:
CC: gcc
USE_LTO: 1
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- name: Gwion
run: |
git clone https://github.com/Gwion/Gwion
cd Gwion
git submodule update --init --recursive
- name: Build
if: ${{ matrix.os != 'windows-latest' }}
run: cd Gwion && make
- name: Build
if: ${{ matrix.os == 'windows-latest' }}
run: cd Gwion && make USE_LTO=0
env:
BUILD_ON_WINDOWS: 1
- name: make
if: ${{ matrix.os != 'windows-latest' }}
run: cd Gwion/fmt && make
- name: make
if: ${{ matrix.os == 'windows-latest' }}
run: cd Gwion/fmt && make USE_LTO=0
env:
BUILD_ON_WINDOWS: 1
- name: Build asset
run: |
strip gwfmt*
7z a gwion-fmt-nightly.zip gwfmt*
- name: Set tag
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git tag -f -a nightly -m "Nightly update"
git push origin -f --follow-tags nightly
- name: Deploy release
uses: WebFreak001/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/Gwion/gwion-fmt/releases/40886026/assets{?name,label}
release_id: 40886026 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./gwion-fmt-nightly.zip # path to archive to upload
asset_name: gwion-fmt-nightly-${{matrix.os}}-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/zip # required by GitHub API
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted