-
-
Notifications
You must be signed in to change notification settings - Fork 145
158 lines (146 loc) · 4.75 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Nightly
on:
workflow_dispatch:
schedule:
# 00:00 every day
- cron: '0 0 * * *'
env:
CARGO_TERM_COLOR: always
GITHUB_REPOSITORY: raphamorim/rio
RUST_BACKTRACE: full
RUSTFLAGS: '-C link-arg=-s'
NIGHTLY_TAG: nightly
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
create_tag:
outputs:
created: ${{ steps.status.outputs.created }}
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
steps:
- uses: actions/checkout@v4
- name: Delete old nightly release
uses: dev-drprasad/[email protected]
with:
tag_name: ${{ env.NIGHTLY_TAG }}
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: true
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
custom_tag: ${{ env.NIGHTLY_TAG }}
tag_prefix: ''
github_token: ${{ secrets.GITHUB_TOKEN }}
- id: status
run: echo "created=true" >> "$GITHUB_OUTPUT"
nightly-release-macos:
needs: create_tag
if: ${{ needs.create_tag.outputs.created == 'true' }}
runs-on: macos-latest
permissions:
contents: write
discussions: write
steps:
- uses: actions/checkout@v4
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
- name: rustup toolchain install stable --profile minimal
run: rustup toolchain install stable --profile minimal
- name: rustup target add x86_64-apple-darwin aarch64-apple-darwin
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin
- name: make release-macos
run: make release-macos
- name: Release nightly
uses: softprops/action-gh-release@v2
with:
name: Nightly
tag_name: ${{ env.NIGHTLY_TAG }}
prerelease: true
append_body: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
release/macos-unsigned.zip
LICENSE
nightly-release-deb:
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
- run: sudo apt install rename
- run: rustup toolchain install stable --profile minimal
- run: cargo install cargo-deb
- run: mkdir -p release
- run: make release-debian-x11
- run: make release-debian-wayland
- name: Release nightly
uses: softprops/action-gh-release@v2
with:
name: Nightly
tag_name: ${{ env.NIGHTLY_TAG }}
prerelease: true
append_body: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
release/debian/x11/*
release/debian/wayland/*
nightly-release-windows:
needs: create_tag
if: ${{ needs.create_tag.outputs.created == 'true' }}
runs-on: windows-latest
defaults:
run:
shell: bash
permissions:
contents: write
discussions: write
strategy:
matrix:
include:
- target: x86_64
wix-arch: x64
- target: aarch64
wix-arch: arm64
steps:
- uses: actions/checkout@v4
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
cache-all-crates: true
key: ${{matrix.target}}
- name: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}-pc-windows-msvc
run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}-pc-windows-msvc
- name: Install WiX
run: dotnet tool install --global wix --version 4.0.5
- run: wix --version
- run: wix extension add WixToolset.UI.wixext/4.0.5 WixToolset.Util.wixext/4.0.5
- run: cargo build --target ${{ matrix.target }}-pc-windows-msvc --release
- name: Crate msi installer
run: |
wix build -arch "${{ matrix.wix-arch}}" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \
-out "./Rio-installer-${{ matrix.target }}.msi" "misc/windows/rio-${{ matrix.target }}.wxs"
- run: cp ./target/${{ matrix.target }}-pc-windows-msvc/release/rio.exe ./Rio-portable-${{ matrix.target }}.exe
- name: Release Nightly
uses: softprops/action-gh-release@v2
with:
name: Nightly
tag_name: ${{ env.NIGHTLY_TAG }}
prerelease: true
append_body: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
./Rio-installer-${{ matrix.target }}.msi
./Rio-portable-${{ matrix.target }}.exe