-
Notifications
You must be signed in to change notification settings - Fork 26
65 lines (61 loc) · 1.75 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (61 loc) · 1.75 KB
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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
default: 'nightly'
type: choice
options:
- nightly
- "%date"
push:
tags:
- '*'
env:
KICK_VERSION: "${{github.event.inputs.version}} || %{github.tag} || nightly"
RUST_LOG: kick=trace
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- {os: windows-latest, method: msi}
- {os: ubuntu-latest, method: deb}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: udoprog/kick@nightly
- run: kick define --github-action --msi-version-to msi_version
id: release
- run: cargo build --release -p oxidize
env:
OXIDIZE_VERSION: ${{steps.release.outputs.version}}
OXIDIZE_FILE_VERSION: ${{steps.release.outputs.msi_version}}
- run: kick zip --output dist
- run: kick ${{matrix.method}} --output dist
if: matrix.method
- uses: actions/upload-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v7
with: {name: dist-macos-latest, path: dist}
- uses: actions/download-artifact@v7
with: {name: dist-windows-latest, path: dist}
- uses: actions/download-artifact@v7
with: {name: dist-ubuntu-latest, path: dist}
- uses: udoprog/kick@nightly
- run: kick github-release --upload "dist/*" --github-action
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}