name: Master CI on: pull_request: branches: - master types: - closed permissions: contents: write jobs: compute-version: name: Determine semantic version if: github.event.pull_request.merged == true runs-on: ubuntu-latest outputs: version: ${{ steps.version.outputs.version }} release_tag: ${{ steps.version.outputs.release_tag }} steps: - name: Checkout tags uses: actions/checkout@v4 with: fetch-depth: 0 - name: Resolve semantic version id: version run: bash scripts/compute_master_semver.sh "${{ github.event.pull_request.title }}" build-windows: name: Windows build + tests needs: compute-version uses: ./.github/workflows/master-windows.yml with: version: ${{ needs.compute-version.outputs.version }} merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }} release-master: name: Tag and release on master needs: - compute-version - build-windows runs-on: ubuntu-latest steps: - name: Download Windows artifact uses: actions/download-artifact@v4 with: name: ccm3-windows-${{ needs.compute-version.outputs.version }}.zip path: release/windows - name: Download Windows installer artifact uses: actions/download-artifact@v4 with: name: ccm3-windows-installer-${{ needs.compute-version.outputs.version }} path: release/installer - name: Package release assets with semantic version run: | mkdir -p release-assets VERSION="${{ needs.compute-version.outputs.version }}" zip -r "release-assets/ccm3-windows-${VERSION}.zip" release/windows cp release/installer/ccm3-windows-installer.exe "release-assets/ccm3-windows-installer-${VERSION}.exe" - name: Create tag and GitHub release uses: softprops/action-gh-release@v2 with: tag_name: ${{ needs.compute-version.outputs.release_tag }} target_commitish: ${{ github.event.pull_request.merge_commit_sha }} generate_release_notes: true files: release-assets/*