From 5fcf1083d2269cb4b4da079afcd1653421e6fa71 Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Thu, 21 Dec 2023 15:01:56 -0500 Subject: [PATCH 1/4] ci: update GitHub actions `uses` deps to latest --- .github/workflows/c-cpp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 86fe9c5c6..33c39e5b8 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -26,7 +26,7 @@ jobs: mingw-w64-i686-SDL2 mingw-w64-i686-zlib - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build pd.exe run: make -f Makefile.port -j - name: Prepare artifact for packaging @@ -36,7 +36,7 @@ jobs: cp /mingw32/bin/{SDL2.dll,zlib1.dll,libgcc_s_dw2-1.dll,libwinpthread-1.dll} bin/ touch bin/data/put_your_rom_here.txt - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pd-i686-windows path: bin/ @@ -51,7 +51,7 @@ jobs: sudo apt-get update sudo apt-get install git gcc g++ gcc-multilib g++-multilib make libsdl2-dev zlib1g-dev libsdl2-dev:i386 zlib1g-dev:i386 - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build pd.exe run: make -f Makefile.port TARGET_PLATFORM=i686-linux -j2 - name: Prepare artifact for packaging @@ -60,7 +60,7 @@ jobs: cp build/ntsc-final-port/pd.exe bin/pd touch bin/data/put_your_rom_here.txt - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pd-i686-linux path: bin/ From 2ef242741966c20e8f71d7d3a33a694ceeb8ff0d Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Thu, 21 Dec 2023 15:02:35 -0500 Subject: [PATCH 2/4] ci: publish builds to a release tag `ci-dev-build` This reserves the tag `ci-dev-build` for use by the CI. --- .github/workflows/c-cpp.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 33c39e5b8..5a940b1a6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -65,4 +65,25 @@ jobs: name: pd-i686-linux path: bin/ retention-days: 0 - + + publish-latest-build: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/port' + needs: [build-i686-windows, build-i686-linux] + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + path: ci-artifacts + - name: Publish latest dev-build + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir ci-release + pushd ci-artifacts + tar czf ../ci-release/pd-i686-linux.tar.gz pd-i686-linux + zip -r ../ci-release/pd-i686-windows.zip pd-i686-windows + popd + git tag --force ci-dev-build port + git push --force origin ci-dev-build + gh release upload --clobber ci-dev-build ci-release/* From dc9d0f3c9c29ac75dd6b213f0c2a2db529cacdcb Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 14 May 2024 11:50:07 +0200 Subject: [PATCH 3/4] ci: give write permission to release job --- .github/workflows/c-cpp.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 5a940b1a6..5e1566fe2 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -70,6 +70,8 @@ jobs: runs-on: ubuntu-latest if: github.ref == 'refs/heads/port' needs: [build-i686-windows, build-i686-linux] + permissions: + contents: write steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 From 865ca682dc48750996c7b98309be81f85a9d7461 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 14 May 2024 11:58:04 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c4e4913a..a855ea0f2 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,9 @@ though you might have to install some additional libraries. ## Download -Latest [automatic builds](https://github.com/fgsfdsfgs/perfect_dark/actions) for supported platforms: -* [i686-windows](https://nightly.link/fgsfdsfgs/perfect_dark/workflows/c-cpp/port/pd-i686-windows.zip) -* [i686-linux](https://nightly.link/fgsfdsfgs/perfect_dark/workflows/c-cpp/port/pd-i686-linux.zip) +Latest [automatic builds](https://github.com/fgsfdsfgs/perfect_dark/releases/tag/ci-dev-build) for supported platforms: +* [i686-windows](https://github.com/fgsfdsfgs/perfect_dark/releases/download/ci-dev-build/pd-i686-windows.zip) +* [i686-linux](https://github.com/fgsfdsfgs/perfect_dark/releases/download/ci-dev-build/pd-i686-linux.tar.gz) If you are looking for netplay builds (the `port-net` branch), see [this link](https://github.com/fgsfdsfgs/perfect_dark/blob/port-net/README.md#download).