Release #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| required: true | |
| description: "Tag" | |
| status: | |
| required: true | |
| description: "Status (beta, stable)" | |
| publish_modrinth: | |
| required: true | |
| description: "Publish to Modrinth" | |
| default: "true" | |
| env: | |
| VERSION: ${{ github.event.inputs.tag }}-${{ github.event.inputs.status }} | |
| concurrency: | |
| group: release-${{ github.event.inputs.tag }} | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Make gradlew executable | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build -PVERSION="${{ env.VERSION }}" --no-daemon | |
| - name: Collect release artifacts | |
| run: | | |
| mkdir -p release-artifacts | |
| find modules -path "*/build/libs/*.jar" \ | |
| ! -name "*-sources.jar" \ | |
| ! -name "*-thin.jar" \ | |
| ! -path "*/core/build/libs/*" \ | |
| -exec cp {} release-artifacts/ \; | |
| - name: Archive artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: geyservoice-release | |
| path: release-artifacts/*.jar | |
| if-no-files-found: error | |
| publish_release: | |
| name: Publish release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: geyservoice-release | |
| path: release-artifacts | |
| - name: Create release | |
| if: github.event.inputs.status == 'stable' | |
| uses: ncipollo/release-action@v1.14.0 | |
| with: | |
| prerelease: false | |
| tag: ${{ github.event.inputs.tag }} | |
| artifacts: release-artifacts/*.jar | |
| artifactErrorsFailBuild: true | |
| allowUpdates: true | |
| replacesArtifacts: true | |
| - name: Create pre-release | |
| if: github.event.inputs.status != 'stable' | |
| uses: ncipollo/release-action@v1.14.0 | |
| with: | |
| prerelease: true | |
| tag: ${{ github.event.inputs.tag }} | |
| artifacts: release-artifacts/*.jar | |
| artifactErrorsFailBuild: true | |
| allowUpdates: true | |
| replacesArtifacts: true | |
| - name: Create Modrinth release | |
| if: github.event.inputs.publish_modrinth == 'true' | |
| uses: dsx137/modrinth-release-action@main | |
| env: | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| with: | |
| name: GeyserVoice ${{ github.event.inputs.tag }} | |
| project_id: WtPu56Wa | |
| loaders: paper, purpur, velocity, bungeecord | |
| game_versions: 1.21.11:26.1 | |
| version_number: ${{ github.event.inputs.tag }} | |
| featured: ${{ github.event.inputs.status == 'stable' }} | |
| version_type: ${{ github.event.inputs.status == 'stable' && 'release' || 'beta' }} | |
| files: release-artifacts/*.jar |