diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c18617c..a59371c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -186,4 +186,43 @@ jobs: - name: Test SporeModManager (mingw) run: | python3 ./SporeModManager/test.py ./artifact/SporeModLoader/SporeModManager/SporeModManager.exe - + create-draft-release: + runs-on: ubuntu-20.04 + needs: [ msvc-test, linux-test, mingw-test ] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Prepare Environment + run: | + $env:revision = git describe --tags --always + echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV + - name: Download SporeModManager (msvc) + uses: actions/download-artifact@v4 + with: + name: SporeModLoader-${{ env.GIT_REVISION }} + path: artifact + - name: Download SporeModManager (mingw) + uses: actions/download-artifact@v4 + with: + name: SporeModLoader-mingw-${{ env.GIT_REVISION }} + path: mingw-artifact + - name: Prepare SporeModManager (msvc) + run: | + pushd artifact + chmod +x SporeModLoader/SporeModManager/SporeModManager + zip -r "../SporeModLoader-${GIT_REVISION}.zip" * + popd + - name: Prepare SporeModManager (mingw) + run: | + pushd mingw-artifact + chmod +x SporeModLoader/SporeModManager/SporeModManager + zip -r "../SporeModLoader-mingw-${GIT_REVISION}.zip" * + popd + - name: Create Draft Release + uses: ncipollo/release-action@v1.13.0 + with: + draft: true + makeLatest: true + tag: ${{ env.GIT_REVISION }} + artifacts: SporeModLoader-${GIT_REVISION}.zip