Skip to content

Release Draft

Release Draft #18

Workflow file for this run

on:
workflow_dispatch:
name: Release Draft
jobs:
get-package-version:
name: Get Package Version
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.version.outputs.PACKAGE_VERSION }}
app_name: ${{ steps.app_name.outputs.APP_NAME }}
fix_app_name: ${{ steps.fix_app_name.outputs.FIX_APP_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: version
run: |
echo "PACKAGE_VERSION=$(npx json version -a < package.json)" >> $GITHUB_OUTPUT
- id: app_name
run: |
echo "APP_NAME=$(npx json name -a < package.json)" >> $GITHUB_OUTPUT
- id: fix_app_name
# remove 3 from "Keira3"
run: |
FIX_APP_NAME=$(echo "$(npx json name -a < package.json)" | sed s/3//g)
echo "FIX_APP_NAME=$FIX_APP_NAME" >> $GITHUB_OUTPUT
build-on-linux:
needs: get-package-version
name: Build and upload the Linux release assets
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build project
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npm run electron:linux
mv "release/${{needs.get-package-version.outputs.app_name}}-${{needs.get-package-version.outputs.version}}.AppImage" ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.AppImage
mv "release/${{needs.get-package-version.outputs.app_name}}-${{needs.get-package-version.outputs.version}}.x86_64.rpm" ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.rpm
mv "release/${{needs.get-package-version.outputs.app_name}}_${{needs.get-package-version.outputs.version}}_amd64.deb" ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.deb
mv "release/${{needs.get-package-version.outputs.app_name}}_${{needs.get-package-version.outputs.version}}_amd64.snap" ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.snap
zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.AppImage.zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.AppImage
zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.rpm.zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.rpm
zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.deb.zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.deb
zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.snap.zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.snap
rm -rf release
rm -rf *.deb
rm -rf *.rpm
rm -rf *.AppImage
rm -rf *.snap
rm -rf release/*.deb
rm -rf release/*.rpm
rm -rf release/*.AppImage
rm -rf release/*.snap
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{needs.get-package-version.outputs.version}}
release_name: ${{needs.get-package-version.outputs.version}}
draft: true
prerelease: false
files: |
${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.AppImage.zip
${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.rpm.zip
${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.deb.zip
${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.LINUX.snap.zip
build-on-mac:
needs: get-package-version
name: Build and upload the Mac release assets
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build project
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npm run electron:mac
mv "release/${{needs.get-package-version.outputs.app_name}}-${{needs.get-package-version.outputs.version}}.dmg" ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.MAC.dmg
zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.MAC.dmg.zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.MAC.dmg
rm -rf release
rm -rf *.yml
rm -rf *.blockmap
rm -rf *.dmg
rm -rf release/*.yml
rm -rf release/*.blockmap
rm -rf release/*.dmg
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{needs.get-package-version.outputs.version}}
release_name: ${{needs.get-package-version.outputs.version}}
draft: true
prerelease: false
files: ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.MAC.dmg.zip
build-on-windows:
needs: get-package-version
name: Build and upload the Windows release assets
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build project
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install;
npm run electron:windows
mv "release/${{needs.get-package-version.outputs.app_name}} ${{needs.get-package-version.outputs.version}}.exe" ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.WINDOWS.exe
7z a ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.WINDOWS.exe.zip ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.WINDOWS.exe
rm -rf release
rm -rf *.exe
rm -rf release/*.exe
shell: bash
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{needs.get-package-version.outputs.version}}
release_name: ${{needs.get-package-version.outputs.version}}
draft: true
prerelease: false
files: ${{needs.get-package-version.outputs.fix_app_name}}-${{needs.get-package-version.outputs.version}}.WINDOWS.exe.zip