diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..4564c6f --- /dev/null +++ b/.github/workflows/build-release.yml @@ -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