-
Notifications
You must be signed in to change notification settings - Fork 90
71 lines (66 loc) · 1.89 KB
/
release.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
name: Release
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
channel:
description: 'release to perform'
required: true
default: 'nightly'
type: choice
options:
- nightly
- "%date"
push:
branches:
- release
env:
KICK_VERSION: "${{github.event.inputs.channel}} || nightly"
RUST_LOG: kick=trace
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-targets
- run: cargo test --doc
- run: cargo run --bin rune -- check --recursive scripts
- run: cargo run --bin rune -- test --all-targets -O test-std
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-12, macos-14, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: udoprog/kick@nightly
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: kick define --github-action
id: release
- run: cargo build --release
- run: cargo run -p builder -- --channel ${{steps.release.outputs.version}}
- uses: actions/upload-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist
publish:
needs: [test, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: udoprog/kick@nightly
- uses: actions/download-artifact@v4
with: {name: dist-macos-12, path: dist}
- uses: actions/download-artifact@v4
with: {name: dist-macos-14, path: dist}
- uses: actions/download-artifact@v4
with: {name: dist-windows-latest, path: dist}
- uses: actions/download-artifact@v4
with: {name: dist-ubuntu-latest, path: dist}
- run: kick github-release --upload "dist/*" --github-action
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}