-
Notifications
You must be signed in to change notification settings - Fork 20
60 lines (51 loc) · 1.37 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (51 loc) · 1.37 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
name: Release
permissions:
contents: write
on:
push:
# Run on x.y.z tags.
tags:
- "**[0-9]+.[0-9]+.[0-9]+*"
# Allow manual triggering.
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
- os: macos-14
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build & test & rename
run: |
mv .cargo/config-portable.toml .cargo/config.toml
cargo build --profile dist
cargo test --profile dist
mkdir artifacts
mv target/dist/deacon artifacts/deacon-${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}
path: artifacts
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: release_artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: release_artifacts/**/*
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}