-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (87 loc) · 2.58 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
99
100
101
102
103
104
105
106
107
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: Install Lua
uses: leafo/gh-actions-lua@v10
- name: Compile Binaries
run: |
crystal build src/main.cr -o geode
tar -zcf geode-nightly-linux-x86_64.tar.gz geode
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: geode
path: |
geode
geode-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: Setup MSVC Build Tools
uses: ilammy/msvc-dev-cmd@v1
- name: Install Lua
uses: leafo/gh-actions-lua@v10
- name: Compile Binaries
run: |
crystal build src\main.cr -o geode.exe
$compress = @{
Path = "geode.exe", "geode.pdb"
DestinationPath = "geode-nightly-windows-x86_64-msvc.zip"
}
Compress-Archive @compress
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: geode
path: |
geode.exe
geode.pdb
geode-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/geode/* .
sha256sum geode geode.exe geode.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 geode-nightly-linux-x86_64.tar.gz
gh release upload nightly geode-nightly-windows-x86_64-msvc.zip