diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/build.yml similarity index 64% rename from .github/workflows/continuous-integration-workflow.yml rename to .github/workflows/build.yml index b34945d..899761d 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build: - name: Build Snes9x GX + name: Build runs-on: ubuntu-latest strategy: matrix: @@ -61,3 +61,41 @@ jobs: name: Snes9xGX-GameCube path: | dist/Snes9xGX-GameCube/ + + release: + name: Release + runs-on: ubuntu-latest + needs: [build] + if: github.ref == 'refs/heads/master' + + steps: + - uses: actions/checkout@v3 + name: Download Artifacts + + - uses: actions/download-artifact@v3 + with: + path: dist + + - name: Re-zip artifacts + run: | + cd dist + rm -r Snes9xGX/snes9xgx/cheats/* + rm -r Snes9xGX/snes9xgx/roms/* + rm -r Snes9xGX/snes9xgx/saves/* + zip -r Snes9xGX.zip Snes9xGX + zip -r Snes9xGX-GameCube.zip Snes9xGX-GameCube + + - name: Update Git Tag + run: | + git tag -f Pre-release + git push -f origin Pre-release + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + prerelease: true + allowUpdates: true + removeArtifacts: true + replacesArtifacts: false + tag: Pre-release + artifacts: "dist/*.zip"