2022-02-21 20:56:05 +05:30
|
|
|
name: Build Application and Make Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build_release:
|
|
|
|
name: Build Release
|
|
|
|
uses: ./.github/workflows/build.yml
|
|
|
|
with:
|
|
|
|
build_type: Release
|
|
|
|
|
|
|
|
create_release:
|
|
|
|
needs: build_release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
steps:
|
2022-03-23 16:06:28 +05:30
|
|
|
- name: Checkout
|
2022-03-23 18:03:18 +05:30
|
|
|
uses: actions/checkout@v3
|
2022-03-23 16:06:28 +05:30
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
path: 'PolyMC-source'
|
2022-02-21 20:56:05 +05:30
|
|
|
- name: Download artifacts
|
2022-03-23 18:03:18 +05:30
|
|
|
uses: actions/download-artifact@v3
|
2022-02-21 20:56:05 +05:30
|
|
|
- name: Grab and store version
|
|
|
|
run: |
|
|
|
|
tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
|
|
|
|
echo "VERSION=$tag_name" >> $GITHUB_ENV
|
|
|
|
- name: Package artifacts properly
|
|
|
|
run: |
|
2022-03-23 16:06:28 +05:30
|
|
|
mv ${{ github.workspace }}/PolyMC-source PolyMC-${{ env.VERSION }}
|
2022-04-19 22:36:17 +05:30
|
|
|
mv PolyMC-Linux-Portable*/PolyMC-portable.tar.gz PolyMC-Linux-Portable-${{ env.VERSION }}.tar.gz
|
2022-02-21 20:56:05 +05:30
|
|
|
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-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz
|
|
|
|
|
2022-03-23 16:06:28 +05:30
|
|
|
tar -czf PolyMC-${{ env.VERSION }}.tar.gz PolyMC-${{ env.VERSION }}
|
|
|
|
|
2022-03-23 18:03:18 +05:30
|
|
|
for d in PolyMC-Windows-*; do
|
|
|
|
cd "${d}" || continue
|
|
|
|
ARCH="$(echo -n ${d} | cut -d '-' -f 3)"
|
2022-04-18 04:11:43 +05:30
|
|
|
PORT="$(echo -n ${d} | grep -o Portable || true)"
|
2022-03-23 18:03:18 +05:30
|
|
|
NAME="PolyMC-Windows-${ARCH}"
|
2022-04-18 04:11:43 +05:30
|
|
|
test -z "${PORT}" || NAME="${NAME}-Portable"
|
2022-03-23 18:03:18 +05:30
|
|
|
zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
|
|
|
|
cd ..
|
|
|
|
done
|
2022-02-21 20:56:05 +05:30
|
|
|
|
2022-03-23 18:03:18 +05:30
|
|
|
- name: Create release
|
|
|
|
id: create_release
|
|
|
|
uses: softprops/action-gh-release@v1
|
2022-03-23 16:06:28 +05:30
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2022-03-23 18:03:18 +05:30
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
name: PolyMC ${{ env.VERSION }}
|
|
|
|
draft: true
|
|
|
|
prerelease: false
|
|
|
|
files: |
|
|
|
|
PolyMC-Linux-${{ env.VERSION }}.tar.gz
|
2022-04-18 04:11:43 +05:30
|
|
|
PolyMC-Linux-Portable-${{ env.VERSION }}.tar.gz
|
2022-03-23 18:03:18 +05:30
|
|
|
PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
|
|
|
|
PolyMC-Windows-i686-${{ env.VERSION }}.zip
|
2022-04-18 04:11:43 +05:30
|
|
|
PolyMC-Windows-i686-Portable-${{ env.VERSION }}.zip
|
2022-03-23 18:03:18 +05:30
|
|
|
PolyMC-Windows-x86_64-${{ env.VERSION }}.zip
|
2022-04-18 04:11:43 +05:30
|
|
|
PolyMC-Windows-x86_64-Portable-${{ env.VERSION }}.zip
|
2022-03-23 18:03:18 +05:30
|
|
|
PolyMC-macOS-${{ env.VERSION }}.tar.gz
|
|
|
|
PolyMC-${{ env.VERSION }}.tar.gz
|