-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (37 loc) · 1.22 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
name: Release
on:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
release_assets:
permissions: write-all
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release --verbose
- name: Upload Asset *nix
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/release/hex-patch
asset_name: hex-patch-${{ matrix.os }}
asset_content_type: application/octet-stream
- name: Upload Asset Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/release/hex-patch.exe
asset_name: hex-patch-${{ matrix.os }}.exe
asset_content_type: application/octet-stream