Build Application and Make Release #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Application and Make Release | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
build_release: | |
name: Build Release | |
uses: ./.github/workflows/build.yml | |
with: | |
build_type: Release | |
is_qt_cached: false | |
secrets: | |
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }} | |
WINDOWS_CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }} | |
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }} | |
APPLE_CODESIGN_CERT: ${{ secrets.APPLE_CODESIGN_CERT }} | |
APPLE_CODESIGN_PASSWORD: ${{ secrets.APPLE_CODESIGN_PASSWORD }} | |
APPLE_CODESIGN_ID: ${{ secrets.APPLE_CODESIGN_ID }} | |
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }} | |
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }} | |
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }} | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }} | |
create_release: | |
needs: build_release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
path: "FreesmLauncher-source" | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- 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 }}/FreesmLauncher-source FreesmLauncher-${{ env.VERSION }} | |
mv PrismLauncher-Linux-Qt6-Portable*/PrismLauncher-portable.tar.gz FreesmLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz | |
mv PrismLauncher-Linux-Qt5-Portable*/PrismLauncher-portable.tar.gz FreesmLauncher-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz | |
mv PrismLauncher-*.AppImage/PrismLauncher-*.AppImage FreesmLauncher-Linux-x86_64.AppImage | |
mv PrismLauncher-*.AppImage.zsync/PrismLauncher-*.AppImage.zsync FreesmLauncher-Linux-x86_64.AppImage.zsync | |
mv PrismLauncher-macOS-Legacy*/PrismLauncher.zip FreesmLauncher-macOS-Legacy-${{ env.VERSION }}.zip | |
mv PrismLauncher-macOS*/PrismLauncher.zip FreesmLauncher-macOS-${{ env.VERSION }}.zip | |
tar --exclude='.git' -czf FreesmLauncher-${{ env.VERSION }}.tar.gz FreesmLauncher-${{ env.VERSION }} | |
for d in PrismLauncher-Windows-MSVC*; do | |
cd "${d}" || continue | |
LEGACY="$(echo -n ${d} | grep -o Legacy || true)" | |
ARM64="$(echo -n ${d} | grep -o arm64 || true)" | |
INST="$(echo -n ${d} | grep -o Setup || true)" | |
PORT="$(echo -n ${d} | grep -o Portable || true)" | |
NAME="FreesmLauncher-Windows-MSVC" | |
test -z "${LEGACY}" || NAME="${NAME}-Legacy" | |
test -z "${ARM64}" || NAME="${NAME}-arm64" | |
test -z "${PORT}" || NAME="${NAME}-Portable" | |
test -z "${INST}" || mv FreesmLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe | |
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" * | |
cd .. | |
done | |
for d in PrismLauncher-Windows-MinGW-w64*; do | |
cd "${d}" || continue | |
INST="$(echo -n ${d} | grep -o Setup || true)" | |
PORT="$(echo -n ${d} | grep -o Portable || true)" | |
NAME="FreesmLauncher-Windows-MinGW-w64" | |
test -z "${PORT}" || NAME="${NAME}-Portable" | |
test -z "${INST}" || mv FreesmLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe | |
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" * | |
cd .. | |
done | |
- name: Create release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ github.ref }} | |
name: Freesm Launcher ${{ env.VERSION }} | |
draft: true | |
prerelease: false | |
files: | | |
FreesmLauncher-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz | |
FreesmLauncher-Linux-x86_64.AppImage | |
FreesmLauncher-Linux-x86_64.AppImage.zsync | |
FreesmLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz | |
FreesmLauncher-Windows-MinGW-w64-${{ env.VERSION }}.zip | |
FreesmLauncher-Windows-MinGW-w64-Portable-${{ env.VERSION }}.zip | |
FreesmLauncher-Windows-MinGW-w64-Setup-${{ env.VERSION }}.exe | |
FreesmLauncher-Windows-MSVC-arm64-${{ env.VERSION }}.zip | |
FreesmLauncher-Windows-MSVC-arm64-Portable-${{ env.VERSION }}.zip | |
FreesmLauncher-Windows-MSVC-arm64-Setup-${{ env.VERSION }}.exe | |
FreesmLauncher-Windows-MSVC-${{ env.VERSION }}.zip | |
FreesmLauncher-Windows-MSVC-Portable-${{ env.VERSION }}.zip | |
FreesmLauncher-Windows-MSVC-Setup-${{ env.VERSION }}.exe | |
FreesmLauncher-macOS-${{ env.VERSION }}.zip | |
FreesmLauncher-macOS-Legacy-${{ env.VERSION }}.zip | |
FreesmLauncher-${{ env.VERSION }}.tar.gz |