diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..e082247 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,31 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - dependabot[bot] + - github-actions[bot] + categories: + - title: "New Features" + labels: + - enhancement + - feature + - title: "Bug Fixes" + labels: + - bug + - fix + - title: "Documentation" + labels: + - documentation + - title: "Maintenance" + labels: + - chore + - refactor + - testing + - build + - title: "Dependencies" + labels: + - dependencies + - title: "Other Changes" + labels: + - "*" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/create-release.yml similarity index 73% rename from .github/workflows/release.yml rename to .github/workflows/create-release.yml index 6878397..3c255b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/create-release.yml @@ -1,9 +1,7 @@ -name: Release +name: Build Executables (Dev) on: - push: - tags: - - "*" + workflow_dispatch: permissions: contents: write @@ -19,14 +17,18 @@ jobs: matrix: include: - os: ubuntu-22.04 - artifact_name: SoftwareManager-${{ github.sha }}-linux + artifact_name: SoftwareManager-stable-${{ github.sha }}-linux + asset_name: SoftwareManager-stable-${{ github.sha }}-linux - os: windows-latest - artifact_name: SoftwareManager-${{ github.sha }}-windows + artifact_name: SoftwareManager-stable-${{ github.sha }}-windows + asset_name: SoftwareManager-stable-${{ github.sha }}-windows - os: macos-latest - artifact_name: SoftwareManager-${{ github.sha }}-macos + artifact_name: SoftwareManager-stable-${{ github.sha }}-macos + asset_name: SoftwareManager-stable-${{ github.sha }}-macos runs-on: ${{ matrix.os }} outputs: + version: ${{ steps.version.outputs.version }} short_sha: ${{ steps.version.outputs.short_sha }} steps: @@ -61,10 +63,13 @@ jobs: id: version shell: bash run: | - SHORT_SHA="${{ github.sha }}" - SHORT_SHA="${SHORT_SHA:0:7}" - echo "VERSION=$SHORT_SHA" >> $GITHUB_ENV + COMMIT_SHA=${{ github.sha }} + SHORT_SHA=${COMMIT_SHA:0:7} + VERSION="${SHORT_SHA}-stable" + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "version=$VERSION" >> $GITHUB_OUTPUT echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT + echo "Generated version: $VERSION" - name: Inject commit hash into code shell: bash @@ -154,28 +159,34 @@ jobs: mkdir -p dist-final if [ "$RUNNER_OS" == "Windows" ]; then mv nuitka-build/main.dist dist-final/${{ env.APP_NAME }} + ls -la dist-final/${{ env.APP_NAME }}/ else chmod +x dist/${{ env.APP_NAME }} mv dist/${{ env.APP_NAME }} dist-final/${{ matrix.artifact_name }} fi + ls -la dist-final/ - name: Create ZIP (Windows) if: runner.os == 'Windows' shell: pwsh run: | Compress-Archive -Path "dist-final/${{ env.APP_NAME }}/*" -DestinationPath "dist-final/${{ matrix.artifact_name }}.zip" + Write-Host "Created ZIP: ${{ matrix.artifact_name }}.zip" - name: Build Installer (Windows) if: runner.os == 'Windows' shell: bash run: | - SETUP_NAME="SoftwareManager-${{ env.VERSION }}-windows-setup" + SHORT_SHA="${{ github.sha }}" + SHORT_SHA="${SHORT_SHA:0:7}" + SETUP_NAME="SoftwareManager-stable-${SHORT_SHA}-windows-setup" iscc //DMyAppVersion="${{ env.VERSION }}" \ //DMySourceDir="dist-final\\${{ env.APP_NAME }}" \ //DMyOutputDir="dist-final" \ //DMyOutputFilename="${SETUP_NAME}" \ installer.iss echo "SETUP_NAME=${SETUP_NAME}" >> $GITHUB_ENV + ls -la dist-final/ - name: Upload build artifact (Windows) if: runner.os == 'Windows' @@ -199,10 +210,10 @@ jobs: name: Create Release needs: build runs-on: ubuntu-22.04 + if: success() steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 with: path: artifacts @@ -211,27 +222,30 @@ jobs: run: | mkdir -p release SHORT_SHA="${{ needs.build.outputs.short_sha }}" - cp artifacts/ubuntu-22.04-build/SoftwareManager-*-linux release/SoftwareManager-${SHORT_SHA}-linux - cp artifacts/windows-latest-build/SoftwareManager-*-windows.zip release/SoftwareManager-${SHORT_SHA}-windows.zip - cp artifacts/windows-latest-build/SoftwareManager-*-windows-setup.exe release/SoftwareManager-${SHORT_SHA}-windows-setup.exe - cp artifacts/macos-latest-build/SoftwareManager-*-macos release/SoftwareManager-${SHORT_SHA}-macos - chmod +x release/SoftwareManager-*-linux release/SoftwareManager-*-macos + cp artifacts/ubuntu-22.04-build/SoftwareManager-stable-*-linux release/SoftwareManager-stable-${SHORT_SHA}-linux + cp artifacts/windows-latest-build/SoftwareManager-stable-*-windows.zip release/SoftwareManager-stable-${SHORT_SHA}-windows.zip + cp artifacts/windows-latest-build/SoftwareManager-stable-*-windows-setup.exe release/SoftwareManager-stable-${SHORT_SHA}-windows-setup.exe + cp artifacts/macos-latest-build/SoftwareManager-stable-*-macos release/SoftwareManager-stable-${SHORT_SHA}-macos + chmod +x release/SoftwareManager-stable-*-linux release/SoftwareManager-stable-*-macos + ls -la release/ - name: Generate checksums run: | cd release sha256sum * > SHA256SUMS.txt + cat SHA256SUMS.txt - - name: Create Release + - name: Create Release (Public) uses: softprops/action-gh-release@v2 with: - name: ${{ needs.build.outputs.short_sha }} + tag_name: ${{ needs.build.outputs.version }} + name: ${{ needs.build.outputs.version }} generate_release_notes: true files: | - release/SoftwareManager-${{ needs.build.outputs.short_sha }}-linux - release/SoftwareManager-${{ needs.build.outputs.short_sha }}-windows.zip - release/SoftwareManager-${{ needs.build.outputs.short_sha }}-windows-setup.exe - release/SoftwareManager-${{ needs.build.outputs.short_sha }}-macos + release/SoftwareManager-stable-${{ needs.build.outputs.short_sha }}-linux + release/SoftwareManager-stable-${{ needs.build.outputs.short_sha }}-windows.zip + release/SoftwareManager-stable-${{ needs.build.outputs.short_sha }}-windows-setup.exe + release/SoftwareManager-stable-${{ needs.build.outputs.short_sha }}-macos release/SHA256SUMS.txt env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/installer.iss b/installer.iss index cc2bd38..83c3f54 100644 --- a/installer.iss +++ b/installer.iss @@ -5,7 +5,7 @@ ; Version is passed via /D on the command line: iscc /DMyAppVersion=... #ifndef MyAppVersion - #define MyAppVersion "dev" + #define MyAppVersion "stable" #endif ; SourceDir is passed via /D on the command line