github actions

This commit is contained in:
2025-07-28 19:34:40 +08:00
parent e0ff976a11
commit 7d17efd889

53
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Release Build
on:
push:
tags: ["v*"]
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
BINARY_NAME: mhws-tex-decompressor
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Build
run: cargo build --verbose --release
- name: Prepare release package
run: |
mkdir release
copy target/release/${{ env.BINARY_NAME }}.exe release/
copy README.md release/
copy LICENSE release/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_NAME }}-windows-x64
path: release/
- name: Create Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
draft: true
files: release/*
name: Release ${{ github.ref_name }}
body: |
## ${{ github.ref_name }}
### Changes
- Please fill in the changes