Skip to content

Commit

Permalink
[Github] Update actions and cleanup job ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
HotaruBlaze committed May 10, 2024
1 parent 4a14b10 commit 9415c36
Showing 1 changed file with 56 additions and 39 deletions.
95 changes: 56 additions & 39 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,71 @@ on:
types: [published]

jobs:
build-x86_64:
name: 'Build NSO-RPC - x86_64'
runs-on: ${{ matrix.os }}
build-windows:
name: 'Build NSO-RPC - Windows'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'ubuntu-latest', 'macos-latest']
pyqt_version:
- 'pyqt6'
- 'pyqt5'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4

# Windows Build
- name: "Build"
if: matrix.os == 'windows-latest'
run: |
python -m pip install ${{ matrix.pyqt_version }} &&
cd scripts &&
python -m pip install pyqt6 &&
./build.bat
- name: "Rename executable"
if: matrix.pyqt_version == 'pyqt5'
run: mv client/dist/NSO-RPC.exe client/dist/NSO-RPC-qt5.exe
- name: "Upload Build"
if: matrix.os == 'windows-latest'
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.4
with:
files: client/dist/NSO-RPC.exe
files: |
client/dist/NSO-RPC*.exe
# Linux Build
build-linux:
name: 'Build NSO-RPC - Linux'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: "Upload script"
if: matrix.os == 'ubuntu-latest'
uses: softprops/action-gh-release@v0.1.15
run: |
cd scripts &&
chmod +x linux.sh
continue-on-error: false
- name: "Upload Build"
uses: softprops/action-gh-release@v2.0.4
with:
files: scripts/linux.sh

# MacOS Build
build-macos:
name: 'Build NSO-RPC - MacOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: "Build"
if: matrix.os == 'macos-latest'
run: |
cd scripts &&
python -m pip install pyqt6 &&
bash ./build.sh &&
./build.sh &&
cd ../client/dist &&
ln -s /Applications "Applications (admin)" &&
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-installer.dmg &&
zip -yr mac-portable.zip NSO-RPC.app/
- name: "Upload Build"
if: matrix.os == 'macos-latest'
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.4
with:
files: |
client/dist/mac-installer.dmg
Expand All @@ -62,9 +78,10 @@ jobs:
name: 'Build NSO-RPC - Universal2'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

# MacOS Universal Build
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: "Install Python 3.11.4 and build NSO-RPC"
run: |
curl https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg -o python-3.11.4-macos11.pkg
Expand All @@ -76,24 +93,24 @@ jobs:
ln -s /Applications "Applications (admin)" &&
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-universal2-installer.dmg &&
zip -yr mac-universal2-portable.zip NSO-RPC.app/
- name: "Upload NSO-RPC Universal2 Build"
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.4
with:
files: |
client/dist/mac-universal2-installer.dmg
client/dist/mac-universal2-portable.zip
get-hashes:
runs-on: "ubuntu-latest"
needs: ["build-x86_64", "build-universal2"]
name: 'Generate Checksums'
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-macos, build-universal2]
steps:
- name: "Generate checksums.txt"
uses: MCJack123/ghaction-generate-release-hashes@v4
with:
hash-type: sha256
file-name: checksums.txt
get-assets: true
- uses: softprops/action-gh-release@v0.1.15
with:
files: checksums.txt
- name: "Generate checksums.txt"
uses: MCJack123/ghaction-generate-release-hashes@v4
with:
hash-type: sha256
file-name: checksums.txt
get-assets: true
- uses: softprops/action-gh-release@v2.0.4
with:
files: checksums.txt

0 comments on commit 9415c36

Please sign in to comment.