From 7d17efd889b1238a8630c6c95e49def2665a70d1 Mon Sep 17 00:00:00 2001 From: Eigeen Date: Mon, 28 Jul 2025 19:34:40 +0800 Subject: [PATCH] github actions --- .github/workflows/release.yml | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a5d3bb5 --- /dev/null +++ b/.github/workflows/release.yml @@ -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