-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (58 loc) · 1.63 KB
/
Copy pathrelease.yml
File metadata and controls
69 lines (58 loc) · 1.63 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
66
67
68
69
name: GitHub Release
on:
push:
tags:
- "v*"
jobs:
build:
name: ${{ matrix.target }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: matrixfall
- os: windows-latest
target: x86_64-pc-windows-msvc
binary: matrixfall.exe
- os: macos-latest
target: x86_64-apple-darwin
binary: matrixfall
runs-on: ${{ matrix.os }}
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@v7
- name: Build
run: cargo build --release
- name: Generate provenance
uses: actions/attest-build-provenance@v4
with:
subject-path: target/release/${{ matrix.binary }}
- name: Upload artifact
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ matrix.target }}
path: target/release/${{ matrix.binary }}
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: Download all artifacts
uses: actions/download-artifact@v8.0.1
with:
path: artifacts
- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ github.ref_name }}" \
artifacts/x86_64-unknown-linux-gnu/matrixfall \
artifacts/x86_64-pc-windows-msvc/matrixfall.exe \
artifacts/x86_64-apple-darwin/matrixfall \
--generate-notes \
--title "${{ github.ref_name }}"