diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8984e880..d2b6988ff 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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: @@ -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: @@ -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 @@ -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 @@ -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 @@ -357,6 +368,7 @@ jobs: $zip_files \ $dmg_files \ $appimage_files \ + ~/artifacts/hashes.sha256 \ -p \ --repo $GITHUB_REPOSITORY \ --title "Continuous build" \