diff --git a/.github/actions/release-with-artifacts/action.yaml b/.github/actions/release-with-artifacts/action.yaml deleted file mode 100644 index 61bb23efe..000000000 --- a/.github/actions/release-with-artifacts/action.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release with artifacts - -inputs: - is-prerelease: - required: true - -runs: - using: composite - steps: - - name: Download artifacts (win-x64) - uses: actions/download-artifact@v4 - with: - name: glazewm-win-x64-${{ github.sha }} - path: artifacts/win-x64 - - - name: Download artifacts (win-x86) - uses: actions/download-artifact@v4 - with: - name: glazewm-win-x86-${{ github.sha }} - path: artifacts/win-x86 - - - uses: glzr-io/actions/semantic-release@main - with: - is-prerelease: ${{ inputs.is-prerelease }} - prerelease-tag: nightly - gh-publish: true - gh-draft-release: ${{ !inputs.is-prerelease }} - gh-token: ${{ github.token }} - gh-assets: | - [ - { - "path": "artifacts/win-x64/GlazeWM.exe", - "name": "GlazeWM_x64_${nextRelease.version}.exe" - }, - { - "path": "artifacts/win-x86/GlazeWM.exe", - "name": "GlazeWM_x86_${nextRelease.version}.exe" - } - ] diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml deleted file mode 100644 index f5fc4b59d..000000000 --- a/.github/workflows/pre-release.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Pre-release - -on: - push: - branches: [main] - -permissions: - contents: write - issues: write - pull-requests: write - -jobs: - build: - uses: ./.github/workflows/build.yaml - - pre-release: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: ./.github/actions/release-with-artifacts - with: - is-prerelease: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f0283aef8..b2c50f7c6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,12 +1,21 @@ name: Release -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + draft-release: + type: boolean + default: false + description: Whether to publish the release as a draft. permissions: contents: write issues: write pull-requests: write +concurrency: + group: release + jobs: build: uses: ./.github/workflows/build.yaml @@ -19,6 +28,31 @@ jobs: with: fetch-depth: 0 - - uses: ./.github/actions/release-with-artifacts + - name: Download artifacts (win-x64) + uses: actions/download-artifact@v4 + with: + name: glazewm-win-x64-${{ github.sha }} + path: artifacts/win-x64 + + - name: Download artifacts (win-x86) + uses: actions/download-artifact@v4 + with: + name: glazewm-win-x86-${{ github.sha }} + path: artifacts/win-x86 + + - uses: glzr-io/actions/semantic-release@main with: - is-prerelease: false + gh-publish: true + gh-draft-release: ${{ inputs.draft-release }} + gh-token: ${{ github.token }} + gh-assets: | + [ + { + "path": "artifacts/win-x64/GlazeWM.exe", + "name": "GlazeWM_x64_${nextRelease.gitTag}" + }, + { + "path": "artifacts/win-x86/GlazeWM.exe", + "name": "GlazeWM_x86_${nextRelease.gitTag}" + } + ]