-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (81 loc) · 2.41 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Nightly
on:
schedule:
- cron: 0 0 * * *
permissions:
actions: write
contents: write
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Install Dependencies
run: shards install --production
- name: Compile Binaries
run: |
crystal build src/main.cr -o crimson
tar -zcf crimson-nightly-linux-x86_64.tar.gz crimson
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: crimson
path: |
crimson
crimson-nightly-linux-x86_64.tar.gz
windows:
needs: linux
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Install Dependencies
run: shards install --production
- name: Compile Binaries
run: |
crystal build src\main.cr -o crimson.exe
$compress = @{
Path = "crimson.exe", "crimson.pdb"
DestinationPath = "crimson-nightly-windows-x86_64-msvc.zip"
}
Compress-Archive @compress
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: crimson
path: |
crimson.exe
crimson.pdb
crimson-nightly-windows-x86_64-msvc.zip
release:
needs: windows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts/
- name: Prepare Artifacts
run: |
mv artifacts/crimson/* .
sha256sum crimson crimson.exe crimson.pdb > checksums.txt
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view nightly &>/dev/null && gh release delete nightly -y
gh release create nightly -pt Nightly --notes "Nightly release for $(date +%F)."
gh release upload nightly checksums.txt
gh release upload nightly crimson-nightly-linux-x86_64.tar.gz
gh release upload nightly crimson-nightly-windows-x86_64-msvc.zip