diff --git a/.github/workflows/theseus-release.yml b/.github/workflows/theseus-release.yml index e3319f259..6cd2be01f 100644 --- a/.github/workflows/theseus-release.yml +++ b/.github/workflows/theseus-release.yml @@ -1,43 +1,47 @@ name: Modrinth App release on: - workflow_run: - workflows: ['Modrinth App build'] - types: [completed] + workflow_dispatch: + inputs: + version-tag: + description: Version tag to release to the wide public + type: string + required: true + release-notes: + description: Release notes to include in the Tauri version manifest + default: A new release of the Modrinth App is available! + type: string + required: true jobs: release: name: Release Modrinth App - if: >- - github.event.workflow_run.conclusion == 'success' && - startsWith(github.event.workflow_run.head_branch, 'v') runs-on: ubuntu-latest env: - VERSION_TAG: ${{ github.event.workflow_run.head_branch }} LINUX_X64_BUNDLE_ARTIFACT_NAME: App bundle (x86_64-unknown-linux-gnu) WINDOWS_X64_BUNDLE_ARTIFACT_NAME: App bundle (x86_64-pc-windows-msvc) MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME: App bundle (universal-apple-darwin) LAUNCHER_FILES_BUCKET_BASE_URL: https://launcher-files.modrinth.com steps: - - name: 📥 Check out code - uses: actions/checkout@v4 - - name: 📥 Download Modrinth App artifacts uses: dawidd6/action-download-artifact@v11 with: workflow: theseus-build.yml workflow_conclusion: success event: push - branch: ${{ env.VERSION_TAG }} + branch: ${{ inputs.version-tag }} use_unzip: true - name: 🛠️ Generate version manifest + env: + VERSION_TAG: ${{ inputs.version-tag }} + RELEASE_NOTES: ${{ inputs.release-notes }} run: | # Reference: https://tauri.app/plugin/updater/#server-support jq -nc \ --arg versionTag "${VERSION_TAG#v}" \ - --arg releaseNotes "See the full changelog at https://modrinth.com/news/changelog" \ + --arg releaseNotes "$RELEASE_NOTES" \ --rawfile macOsAarch64UpdateArtifactSignature "${MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME}/universal-apple-darwin/release/bundle/macos/Modrinth App.app.tar.gz.sig" \ --rawfile macOsX64UpdateArtifactSignature "${MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME}/universal-apple-darwin/release/bundle/macos/Modrinth App.app.tar.gz.sig" \ --rawfile linuxX64UpdateArtifactSignature "${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/appimage/Modrinth App_${VERSION_TAG#v}_amd64.AppImage.tar.gz.sig" \ @@ -79,6 +83,7 @@ jobs: - name: 📤 Upload release artifacts env: + VERSION_TAG: ${{ inputs.version-tag }} AWS_ACCESS_KEY_ID: ${{ secrets.LAUNCHER_FILES_BUCKET_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.LAUNCHER_FILES_BUCKET_SECRET_ACCESS_KEY }} AWS_BUCKET: ${{ secrets.LAUNCHER_FILES_BUCKET_NAME }} @@ -111,18 +116,3 @@ jobs: done aws s3 cp updates.json "s3://${AWS_BUCKET}" - - - name: 🏷️ Create GitHub release - env: - GH_TOKEN: ${{ github.token }} - run: | - VERSION="${VERSION_TAG#v}" - - gh release create "$VERSION_TAG" \ - --title "Modrinth App ${VERSION}" \ - --notes "See the full changelog at https://modrinth.com/news/changelog" \ - "${WINDOWS_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/nsis/Modrinth App_${VERSION}_x64-setup.exe" \ - "${MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME}/universal-apple-darwin/release/bundle/dmg/Modrinth App_${VERSION}_universal.dmg" \ - "${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/appimage/Modrinth App_${VERSION}_amd64.AppImage" \ - "${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/deb/Modrinth App_${VERSION}_amd64.deb" \ - "${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/rpm/Modrinth App-${VERSION}-1.x86_64.rpm"