-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from randovania/release-artifacts
Windows (Exe)
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Distribute Exe | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'recursive' | ||
|
||
- name: Add powerpc-unknown-linux-gnu | ||
run: rustup target add --toolchain stable powerpc-unknown-linux-gnu | ||
working-directory: randomprime | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Cargo Build | ||
run: cargo build --release | ||
working-directory: randomprime | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: randomprime_patcher.exe | ||
path: randomprime\target\release\randomprime_patcher.exe | ||
if-no-files-found: error | ||
|
||
attach: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: randomprime_patcher.exe | ||
|
||
- uses: montudor/action-zip@v1 | ||
with: | ||
args: zip randomprime_patcher.zip randomprime_patcher.exe | ||
|
||
- name: Attach to Release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: randomprime_patcher.zip | ||
asset_name: randomprime_patcher-$tag.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true |