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
|
2022-07-14 02:12:25 +05:30
|
|
|
secrets:
|
|
|
|
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
|
2022-02-21 20:56:05 +05:30
|
|
|
|
|
|
|
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'
|
2022-10-18 13:43:44 +05:30
|
|
|
path: 'PrismLauncher-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-10-18 13:43:44 +05:30
|
|
|
mv ${{ github.workspace }}/PrismLauncher-source PrismLauncher-${{ env.VERSION }}
|
|
|
|
mv PrismLauncher-Linux-Qt6-Portable*/PrismLauncher-portable.tar.gz PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
|
|
|
|
mv PrismLauncher-Linux-Qt6*/PrismLauncher.tar.gz PrismLauncher-Linux-Qt6-${{ env.VERSION }}.tar.gz
|
|
|
|
mv PrismLauncher-Linux-Portable*/PrismLauncher-portable.tar.gz PrismLauncher-Linux-Portable-${{ env.VERSION }}.tar.gz
|
|
|
|
mv PrismLauncher-Linux*/PrismLauncher.tar.gz PrismLauncher-Linux-${{ env.VERSION }}.tar.gz
|
|
|
|
mv PrismLauncher-*.AppImage/PrismLauncher-*.AppImage PrismLauncher-Linux-${{ env.VERSION }}-x86_64.AppImage
|
|
|
|
mv PrismLauncher-macOS-Legacy*/PrismLauncher.tar.gz PrismLauncher-macOS-Legacy-${{ env.VERSION }}.tar.gz
|
|
|
|
mv PrismLauncher-macOS*/PrismLauncher.tar.gz PrismLauncher-macOS-${{ env.VERSION }}.tar.gz
|
2022-02-21 20:56:05 +05:30
|
|
|
|
2022-10-18 13:43:44 +05:30
|
|
|
tar -czf PrismLauncher-${{ env.VERSION }}.tar.gz PrismLauncher-${{ env.VERSION }}
|
2022-03-23 16:06:28 +05:30
|
|
|
|
2022-10-18 13:43:44 +05:30
|
|
|
for d in PrismLauncher-Windows-*; do
|
2022-03-23 18:03:18 +05:30
|
|
|
cd "${d}" || continue
|
2022-07-09 12:29:43 +05:30
|
|
|
LEGACY="$(echo -n ${d} | grep -o Legacy || true)"
|
2022-05-21 02:39:26 +05:30
|
|
|
INST="$(echo -n ${d} | grep -o Setup || true)"
|
2022-04-18 04:11:43 +05:30
|
|
|
PORT="$(echo -n ${d} | grep -o Portable || true)"
|
2022-10-18 13:43:44 +05:30
|
|
|
NAME="PrismLauncher-Windows"
|
2022-07-09 12:29:43 +05:30
|
|
|
test -z "${LEGACY}" || NAME="${NAME}-Legacy"
|
2022-04-18 04:11:43 +05:30
|
|
|
test -z "${PORT}" || NAME="${NAME}-Portable"
|
2022-10-18 13:43:44 +05:30
|
|
|
test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
|
2022-05-21 02:39:26 +05:30
|
|
|
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
|
2022-03-23 18:03:18 +05:30
|
|
|
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 }}
|
2022-10-18 13:43:44 +05:30
|
|
|
name: PrismLauncher ${{ env.VERSION }}
|
2022-03-23 18:03:18 +05:30
|
|
|
draft: true
|
|
|
|
prerelease: false
|
|
|
|
files: |
|
2022-10-18 13:43:44 +05:30
|
|
|
PrismLauncher-Linux-${{ env.VERSION }}.tar.gz
|
|
|
|
PrismLauncher-Linux-Portable-${{ env.VERSION }}.tar.gz
|
|
|
|
PrismLauncher-Linux-${{ env.VERSION }}-x86_64.AppImage
|
|
|
|
PrismLauncher-Windows-Legacy-${{ env.VERSION }}.zip
|
|
|
|
PrismLauncher-Linux-Qt6-${{ env.VERSION }}.tar.gz
|
|
|
|
PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
|
|
|
|
PrismLauncher-Windows-Legacy-Portable-${{ env.VERSION }}.zip
|
|
|
|
PrismLauncher-Windows-Legacy-Setup-${{ env.VERSION }}.exe
|
|
|
|
PrismLauncher-Windows-${{ env.VERSION }}.zip
|
|
|
|
PrismLauncher-Windows-Portable-${{ env.VERSION }}.zip
|
|
|
|
PrismLauncher-Windows-Setup-${{ env.VERSION }}.exe
|
|
|
|
PrismLauncher-macOS-${{ env.VERSION }}.tar.gz
|
|
|
|
PrismLauncher-macOS-Legacy-${{ env.VERSION }}.tar.gz
|
|
|
|
PrismLauncher-${{ env.VERSION }}.tar.gz
|