Skip to content

Commit 2a05c11

Browse files
committed
ci: add release script
1 parent eaf95c3 commit 2a05c11

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/release.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
binary_name:
10+
description: "Binary name for release"
11+
required: true
12+
default: ssadecrypt
13+
14+
jobs:
15+
create-release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: taiki-e/create-gh-release-action@v1
20+
with:
21+
prefix: ${{ inputs.binary_name }}
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
upload-assets:
25+
needs: create-release
26+
strategy:
27+
matrix:
28+
include:
29+
- target: x86_64-unknown-linux-gnu
30+
os: ubuntu-latest
31+
- target: x86_64-apple-darwin
32+
os: macos-latest
33+
- target: x86_64-pc-windows-msvc
34+
os: windows-latest
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: taiki-e/upload-rust-binary-action@v1
39+
with:
40+
bin: ${{ inputs.binary_name }}
41+
target: ${{ matrix.target }}
42+
tar: unix
43+
zip: windows
44+
token: ${{ secrets.GITHUB_TOKEN }}

bin/minyami/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ fn main() {
1313
let version = env!("CARGO_PKG_VERSION");
1414
let hash = get_hash().unwrap_or_else(|_| "unknown".to_string());
1515
println!("cargo:rustc-env=IORI_MINYAMI_VERSION={version} ({hash})");
16-
}
16+
}

0 commit comments

Comments
 (0)