Skip to content

Commit

Permalink
Merge pull request #805 from dsm/current
Browse files Browse the repository at this point in the history
deploy CI improvements.
  • Loading branch information
ra3xdh authored Jul 5, 2024
2 parents d805c1d + a4ecf03 commit 14097ce
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
branches: [ "master", "current", "release/*" ]
pull_request:
branches: [ "master", "current", "release/*" ]

workflow_dispatch:

env:
APP_NAME: "Qucs-S Simulator"
APP_NAME: "Qucs-S"
EXECUTABLE_NAME: "qucs-s"
VERSION: "24.2.1"
PUBLISHER_NAME: "The Qucs Team"
PUBLISHER_NAME: "The Qucs-S Team"
BUILD_TYPE: Release
QT_VERSION: 6.7.2
QUCS_MACOS_BIN: ./build/qucs/qucs-s.app/Contents/MacOS/bin
Expand Down Expand Up @@ -56,13 +57,13 @@ jobs:
./linuxdeploy-x86_64.AppImage --appdir ${{github.workspace}}/AppDir --desktop-file=${{github.workspace}}/AppDir/usr/share/applications/qucs-s.desktop --icon-file=${{github.workspace}}/AppDir/usr/share/icons/hicolor/256x256/apps/qucs-s.png --plugin=qt --output appimage
rm linuxdeploy-x86_64.AppImage
rm linuxdeploy-plugin-qt-x86_64.AppImage
mv *.AppImage Qucs-S-x86_64-Linux.AppImage
mv *.AppImage ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage
- name: 'Upload artifact: AppImage'
uses: actions/upload-artifact@v4
with:
name: Qucs-S-x86_64-Linux
path: Qucs-S-x86_64-Linux.AppImage
name: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64
path: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage


build-mac-intel:
Expand Down Expand Up @@ -138,13 +139,13 @@ jobs:
codesign --force --deep --sign - ./build/qucs/qucs-s.app
npm install --global create-dmg
create-dmg ./build/qucs/qucs-s.app ./build/qucs/ || true
cp -pR ./build/qucs/qucs-*.dmg ./build/qucs_s_${{env.VERSION}}_x86_64.dmg
cp -pR ./build/qucs/qucs-*.dmg ./${{ env.APP_NAME }}-${{env.VERSION}}-macOS-x86_64.dmg
- name: 'Upload build artifacts'
uses: actions/upload-artifact@v4
with:
name: qucs_s_macos_x86_64
path: 'build/*.dmg'
name: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS-x86_64
path: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS-x86_64.dmg


build-mac-arm:
Expand Down Expand Up @@ -220,13 +221,13 @@ jobs:
codesign --force --deep --sign - ./build/qucs/qucs-s.app
npm install --global create-dmg
create-dmg ./build/qucs/qucs-s.app ./build/qucs/ || true
cp -pR ./build/qucs/qucs-*.dmg ./build/qucs_s_${{env.VERSION}}_arm64.dmg
cp -pR ./build/qucs/qucs-*.dmg ./${{ env.APP_NAME }}-${{env.VERSION}}-macOS-arm64.dmg
- name: 'Upload build artifacts'
uses: actions/upload-artifact@v4
with:
name: qucs_s_macos_arm64
path: 'build/*.dmg'
name: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS-arm64
path: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS-arm64.dmg

build-windows:
runs-on: windows-2022
Expand Down Expand Up @@ -309,14 +310,14 @@ jobs:
- name: Create zip archive for release
run: |
cd build/qucs-suite
zip -r ../qucs_s_${{ matrix.environment }}_snapshot.zip ./bin ./re
zip -r ../../${{ env.APP_NAME }}-${{ env.VERSION }}-win64.zip ./bin ./re
cd ../..
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: qucs_s_${{ matrix.environment }}
path: build/qucs_s_${{ matrix.environment }}_snapshot.zip
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-win64
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-win64.zip

create-release:
runs-on: ubuntu-latest
Expand All @@ -335,6 +336,16 @@ jobs:
with:
path: ~/artifacts

- name: Calculate SHA-256 checksums
run: |
cd ~/artifacts
> hashes.sha256
for file in $(find . -type f \( -name "*.zip" -o -name "*.dmg" -o -name "*.AppImage" \)); do
filename=$(basename "$file")
sha256sum "$file" | awk -v fname="$filename" '{print $1 " *" fname}' >> hashes.sha256
done
cd ..
- name: Check if continuous_build release exists
run: |
if gh release view continuous_build --repo $GITHUB_REPOSITORY &> /dev/null; then
Expand All @@ -357,6 +368,7 @@ jobs:
$zip_files \
$dmg_files \
$appimage_files \
~/artifacts/hashes.sha256 \
-p \
--repo $GITHUB_REPOSITORY \
--title "Continuous build" \
Expand Down

0 comments on commit 14097ce

Please sign in to comment.