From 440e9731e2c49613891785436101423d3b6bc883 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Thu, 17 Mar 2022 16:55:45 +0100 Subject: Switch to msys2 for Windows builds --- .github/workflows/build.yml | 95 +++++++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 38 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5797e95..a0736f76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,9 +25,12 @@ jobs: app_image: true - os: windows-2022 - qt_version: 5.15.2 - qt_host: windows - qt_arch: win32_mingw81 + name: "Windows-i686" + msystem: mingw32 + + - os: windows-2022 + name: "Windows-x86_64" + msystem: mingw64 - os: macos-11 qt_version: 5.12.12 @@ -42,38 +45,24 @@ jobs: BUILD_DIR: "build" steps: - - name: Install 32bit mingw on Windows - if: runner.os == 'Windows' - uses: egor-tensin/setup-mingw@v2 - with: - platform: x86 - - - name: Install 32bit zlib via Strawberry on Windows - if: runner.os == 'Windows' - run: | - choco install strawberryperl -y --force --x86 - - name: Checkout uses: actions/checkout@v2 with: submodules: 'true' - # We need to do this here because it inexplicably fails if we split the step - - name: Download and install OpenSSL libs on Windows + - name: 'Setup MSYS2' if: runner.os == 'Windows' - run: | - python -m pip install --upgrade pip - python -m pip install aqtinstall==2.0.5 - python -m aqt install-tool -O "${{ github.workspace }}\Qt\" windows desktop tools_openssl_x86 - mkdir ${{ env.INSTALL_DIR }} - copy "${{ github.workspace }}\Qt\Tools\OpenSSL\Win_x86\bin\libssl-1_1.dll" "${{ github.workspace }}\${{ env.INSTALL_DIR }}\" - copy "${{ github.workspace }}\Qt\Tools\OpenSSL\Win_x86\bin\libcrypto-1_1.dll" "${{ github.workspace }}\${{ env.INSTALL_DIR }}\" - - - name: Set short version - shell: bash - run: | - ver_short=`git rev-parse --short HEAD` - echo "VERSION=$ver_short" >> $GITHUB_ENV + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + update: true + install: >- + git + pacboy: >- + toolchain:p + cmake:p + ninja:p + qt5:p - name: Install OpenJDK uses: AdoptOpenJDK/install-jdk@v1 @@ -81,6 +70,7 @@ jobs: version: '17' - name: Cache Qt + if: runner.os != 'Windows' id: cache-qt uses: actions/cache@v2 with: @@ -88,7 +78,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.qt_version }}-${{ matrix.qt_arch }}-qt_cache - name: Install Qt - if: runner.os != 'Linux' || matrix.app_image == true + if: runner.os != 'Linux' && runner.os != 'Windows' || matrix.app_image == true uses: jurplel/install-qt-action@v2 with: version: ${{ matrix.qt_version }} @@ -104,6 +94,7 @@ jobs: sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5 - name: Install Ninja + if: runner.os != 'Windows' uses: urkle/action-get-ninja@v1 - name: Download linuxdeploy family for AppImage on Linux @@ -120,7 +111,13 @@ jobs: ${{ github.workspace }}/.github/scripts/prepare_JREs.sh - name: Configure CMake - if: runner.os != 'Linux' + if: runner.os != 'Linux' && runner.os != 'Windows' + run: | + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja + + - name: Configure CMake on Windows + if: runner.os == 'Windows' + shell: msys2 {0} run: | cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja @@ -130,11 +127,24 @@ jobs: cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja - name: Build + if: runner.os != 'Windows' + run: | + cmake --build ${{ env.BUILD_DIR }} + + - name: Build on Windows + if: runner.os == 'Windows' + shell: msys2 {0} run: | cmake --build ${{ env.BUILD_DIR }} - name: Install - if: runner.os != 'Linux' + if: runner.os != 'Linux' && runner.os != 'Windows' + run: | + cmake --install ${{ env.BUILD_DIR }} + + - name: Install on Windows + if: runner.os == 'Windows' + shell: msys2 {0} run: | cmake --install ${{ env.BUILD_DIR }} @@ -165,11 +175,6 @@ jobs: ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_DIR }} --output appimage --plugin qt -i ${{ env.INSTALL_DIR }}/usr/share/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg - - name: Run windeployqt - if: runner.os == 'Windows' - run: | - windeployqt --no-translations --no-system-d3d-compiler --no-opengl-sw "${{ env.INSTALL_DIR }}/polymc.exe" - - name: Run macdeployqt if: runner.os == 'macOS' run: | @@ -207,11 +212,25 @@ jobs: name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage path: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage + - name: Copy OpenSSL libs on Windows x86 + if: runner.os == 'Windows' && matrix.msystem == 'mingw32' + shell: msys2 {0} + run: | + cp /mingw32/bin/libcrypto-1_1.dll ${{ env.INSTALL_DIR }}/ + cp /mingw32/bin/libssl-1_1.dll ${{ env.INSTALL_DIR }}/ + + - name: Copy OpenSSL libs on Windows x86_64 + if: runner.os == 'Windows' && matrix.msystem == 'mingw64' + shell: msys2 {0} + run: | + cp /mingw64/bin/libcrypto-1_1-x64.dll ${{ env.INSTALL_DIR }}/ + cp /mingw64/bin/libssl-1_1-x64.dll ${{ env.INSTALL_DIR }}/ + - name: Upload package for Windows if: runner.os == 'Windows' uses: actions/upload-artifact@v2 with: - name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }} + name: PolyMC-${{ matrix.name }}-${{ inputs.build_type }} path: ${{ env.INSTALL_DIR }}/** - name: Upload package for macOS -- cgit From f01b8f29c68cde62d31293175482d1d0c9bc23e0 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Thu, 17 Mar 2022 23:32:44 +0100 Subject: Use Temurin instead of AdoptOpenJDK --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0736f76..325e28b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,9 +65,10 @@ jobs: qt5:p - name: Install OpenJDK - uses: AdoptOpenJDK/install-jdk@v1 + uses: actions/setup-java@v3 with: - version: '17' + distribution: 'temurin' + java-version: '17' - name: Cache Qt if: runner.os != 'Windows' -- cgit From 620252537295fa7dd5ce8a27ce03561a597ed0cd Mon Sep 17 00:00:00 2001 From: Philipp David Date: Fri, 18 Mar 2022 22:28:52 +0100 Subject: Readd short rev to artifact names --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 325e28b8..ac181079 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,12 @@ jobs: ninja:p qt5:p + - name: Set short version + shell: bash + run: | + ver_short=`git rev-parse --short HEAD` + echo "VERSION=$ver_short" >> $GITHUB_ENV + - name: Install OpenJDK uses: actions/setup-java@v3 with: @@ -231,7 +237,7 @@ jobs: if: runner.os == 'Windows' uses: actions/upload-artifact@v2 with: - name: PolyMC-${{ matrix.name }}-${{ inputs.build_type }} + name: PolyMC-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }} path: ${{ env.INSTALL_DIR }}/** - name: Upload package for macOS -- cgit From 3c0c57359b0a85313f962582b56f6e561366dfd0 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 21 Mar 2022 14:46:01 +0100 Subject: feat(actions): add backport bot --- .github/workflows/backport.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/backport.yml (limited to '.github/workflows') diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..e1a7cffa --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,17 @@ +name: Backport PR to stable +on: + pull_request: + branches: [ develop ] + types: [ closed ] +jobs: + release_pull_request: + if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'backport') + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v1 + - name: Backport PR by cherry-pick-ing + uses: Nathanmalnoury/gh-backport-action@master + with: + pr_branch: 'stable' + github_token: ${{ secrets.GITHUB_TOKEN }} -- cgit From 2741c58a01bbc0c8d1f8768299cfcf0ebf3fb275 Mon Sep 17 00:00:00 2001 From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> Date: Mon, 21 Mar 2022 19:11:55 +0100 Subject: bring back notportable builds --- .github/workflows/build.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac181079..8819b80b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,23 @@ jobs: - os: windows-2022 name: "Windows-i686" msystem: mingw32 + portable: false - os: windows-2022 name: "Windows-x86_64" msystem: mingw64 + portable: false + + - os: windows-2022 + name: "Windows-i686-portable" + msystem: mingw32 + portable: true + + - os: windows-2022 + name: "Windows-x86_64-portable" + msystem: mingw64 + portable: true + - os: macos-11 qt_version: 5.12.12 @@ -138,11 +151,17 @@ jobs: run: | cmake --build ${{ env.BUILD_DIR }} - - name: Build on Windows - if: runner.os == 'Windows' + - name: Build on Windows portable + if: runner.os == 'Windows' && matrix.portable == true shell: msys2 {0} run: | cmake --build ${{ env.BUILD_DIR }} + + - name: Build on Windows + if: runner.os == 'Windows' && matrix.portable != true + shell: msys2 {0} + run: | + cmake --build ${{ env.BUILD_DIR }} _DLauncher_PORTABLE=OFF - name: Install if: runner.os != 'Linux' && runner.os != 'Windows' -- cgit From d1d055564ccdcd7bb4aa37cb4cd42b7429cffa96 Mon Sep 17 00:00:00 2001 From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> Date: Mon, 21 Mar 2022 19:21:09 +0100 Subject: fix typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8819b80b..b0a57c41 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -161,7 +161,7 @@ jobs: if: runner.os == 'Windows' && matrix.portable != true shell: msys2 {0} run: | - cmake --build ${{ env.BUILD_DIR }} _DLauncher_PORTABLE=OFF + cmake --build ${{ env.BUILD_DIR }} -DLauncher_PORTABLE=OFF - name: Install if: runner.os != 'Linux' && runner.os != 'Windows' -- cgit From 8accb6f04e1b9bcbfaf68f7930ffd12fddebccf8 Mon Sep 17 00:00:00 2001 From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> Date: Mon, 21 Mar 2022 19:29:33 +0100 Subject: fix typos opz :P --- .github/workflows/build.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0a57c41..5fb98faa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,11 +135,18 @@ jobs: run: | cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja - - name: Configure CMake on Windows - if: runner.os == 'Windows' + - name: Configure CMake on Windows + if: runner.os == 'Windows' && matrix.portable != true shell: msys2 {0} run: | - cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja -DLauncher_PORTABLE=OFF + + + - name: Configure CMake on Windows portable + if: runner.os == 'Windows' && matrix.portable == true + shell: msys2 {0} + run: | + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja - name: Configure CMake on Linux if: runner.os == 'Linux' @@ -151,17 +158,11 @@ jobs: run: | cmake --build ${{ env.BUILD_DIR }} - - name: Build on Windows portable - if: runner.os == 'Windows' && matrix.portable == true + - name: Build on Windows + if: runner.os == 'Windows' shell: msys2 {0} run: | cmake --build ${{ env.BUILD_DIR }} - - - name: Build on Windows - if: runner.os == 'Windows' && matrix.portable != true - shell: msys2 {0} - run: | - cmake --build ${{ env.BUILD_DIR }} -DLauncher_PORTABLE=OFF - name: Install if: runner.os != 'Linux' && runner.os != 'Windows' -- cgit From c6b1a776dcfada3408f4265a22fdbfdd23deccd9 Mon Sep 17 00:00:00 2001 From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> Date: Tue, 22 Mar 2022 07:38:00 +0100 Subject: fix some typos --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fb98faa..4aa316f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,6 @@ jobs: msystem: mingw64 portable: true - - os: macos-11 qt_version: 5.12.12 qt_host: mac @@ -139,7 +138,7 @@ jobs: if: runner.os == 'Windows' && matrix.portable != true shell: msys2 {0} run: | - cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja -DLauncher_PORTABLE=OFF + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja - name: Configure CMake on Windows portable @@ -158,7 +157,7 @@ jobs: run: | cmake --build ${{ env.BUILD_DIR }} - - name: Build on Windows + - name: Build on Windows if: runner.os == 'Windows' shell: msys2 {0} run: | -- cgit From 51de84407f486adc8c13c4d9c2b72a75bd8adf69 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Wed, 23 Mar 2022 11:36:28 +0100 Subject: Create vendored tarball on release --- .github/workflows/trigger_release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index b487e731..a1d61d05 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -39,6 +39,12 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'true' + path: 'PolyMC-source' + - name: Download artifacts uses: actions/download-artifact@v2 @@ -49,11 +55,14 @@ jobs: - name: Package artifacts properly run: | + mv ${{ github.workspace }}/PolyMC-source PolyMC-${{ env.VERSION }} mv PolyMC-Linux*/PolyMC.tar.gz PolyMC-Linux-${{ env.VERSION }}.tar.gz mv PolyMC-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }} mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz + tar -czf PolyMC-${{ env.VERSION }}.tar.gz PolyMC-${{ env.VERSION }} + cd PolyMC-Windows-${{ env.VERSION }} zip -r -9 ../PolyMC-Windows-${{ env.VERSION }}.zip * cd .. @@ -97,3 +106,13 @@ jobs: asset_name: PolyMC-macOS-${{ env.VERSION }}.tar.gz asset_path: PolyMC-macOS-${{ env.VERSION }}.tar.gz asset_content_type: application/gzip + + - name: Upload vendored source tarball + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_name: PolyMC-${{ env.VERSION }}.tar.gz + asset_path: PolyMC-${{ env.VERSION }}.tar.gz + asset_content_type: application/gzip -- cgit From 471ea680a5aea20385667635d5a3695841bfa194 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Wed, 23 Mar 2022 13:33:18 +0100 Subject: Update used actions and cleanup release flow --- .github/workflows/backport.yml | 4 +- .github/workflows/build.yml | 12 ++-- .github/workflows/trigger_release.yml | 102 +++++++++------------------------- 3 files changed, 36 insertions(+), 82 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index e1a7cffa..fa287a2c 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -9,7 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Backport PR by cherry-pick-ing uses: Nathanmalnoury/gh-backport-action@master with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4aa316f4..3e8681c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'true' @@ -91,7 +91,7 @@ jobs: - name: Cache Qt if: runner.os != 'Windows' id: cache-qt - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "${{ github.workspace }}/Qt/" key: ${{ runner.os }}-${{ matrix.qt_version }}-${{ matrix.qt_arch }}-qt_cache @@ -226,14 +226,14 @@ jobs: - name: Upload Linux tar.gz if: runner.os == 'Linux' && matrix.app_image != true - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }} path: PolyMC.tar.gz - name: Upload AppImage for Linux if: matrix.app_image == true - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage path: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage @@ -254,14 +254,14 @@ jobs: - name: Upload package for Windows if: runner.os == 'Windows' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: PolyMC-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }} path: ${{ env.INSTALL_DIR }}/** - name: Upload package for macOS if: runner.os == 'macOS' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }} path: PolyMC.tar.gz diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index a1d61d05..149cb632 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -19,100 +19,52 @@ jobs: outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: - - name: Grab and store version - run: | - tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$") - echo "VERSION=$tag_name" >> $GITHUB_ENV - - name: Create release - id: create_release - uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - name: PolyMC ${{ env.VERSION }} - draft: true - prerelease: false - - upload_release: - needs: create_release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'true' path: 'PolyMC-source' - - name: Download artifacts - uses: actions/download-artifact@v2 - + uses: actions/download-artifact@v3 - name: Grab and store version run: | tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$") echo "VERSION=$tag_name" >> $GITHUB_ENV - - name: Package artifacts properly run: | mv ${{ github.workspace }}/PolyMC-source PolyMC-${{ env.VERSION }} mv PolyMC-Linux*/PolyMC.tar.gz PolyMC-Linux-${{ env.VERSION }}.tar.gz mv PolyMC-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage - mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }} mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz tar -czf PolyMC-${{ env.VERSION }}.tar.gz PolyMC-${{ env.VERSION }} - cd PolyMC-Windows-${{ env.VERSION }} - zip -r -9 ../PolyMC-Windows-${{ env.VERSION }}.zip * - cd .. - - - name: Upload Linux asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: PolyMC-Linux-${{ env.VERSION }}.tar.gz - asset_path: PolyMC-Linux-${{ env.VERSION }}.tar.gz - asset_content_type: application/gzip - - - name: Upload Linux AppImage asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage - asset_path: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage - asset_content_type: application/x-executable - - - name: Upload Windows asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: PolyMC-Windows-${{ env.VERSION }}.zip - asset_path: PolyMC-Windows-${{ env.VERSION }}.zip - asset_content_type: application/zip + for d in PolyMC-Windows-*; do + cd "${d}" || continue + ARCH="$(echo -n ${d} | cut -d '-' -f 3)" + PORT="$(echo -n ${d} | grep -o portable || true)" + NAME="PolyMC-Windows-${ARCH}" + test -z "${PORT}" || NAME="${NAME}-portable" + zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" * + cd .. + done - - name: Upload macOS asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: PolyMC-macOS-${{ env.VERSION }}.tar.gz - asset_path: PolyMC-macOS-${{ env.VERSION }}.tar.gz - asset_content_type: application/gzip - - - name: Upload vendored source tarball - uses: actions/upload-release-asset@v1 + - name: Create release + id: create_release + uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: PolyMC-${{ env.VERSION }}.tar.gz - asset_path: PolyMC-${{ env.VERSION }}.tar.gz - asset_content_type: application/gzip + tag_name: ${{ github.ref }} + name: PolyMC ${{ env.VERSION }} + draft: true + prerelease: false + files: | + PolyMC-Linux-${{ env.VERSION }}.tar.gz + PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage + PolyMC-Windows-i686-${{ env.VERSION }}.zip + PolyMC-Windows-i686-portable-${{ env.VERSION }}.zip + PolyMC-Windows-x86_64-${{ env.VERSION }}.zip + PolyMC-Windows-x86_64-portable-${{ env.VERSION }}.zip + PolyMC-macOS-${{ env.VERSION }}.tar.gz + PolyMC-${{ env.VERSION }}.tar.gz -- cgit