Release #172
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: | |
| release_type: | |
| description: 'The published artifact release type' | |
| required: false | |
| default: 'STABLE' | |
| type: choice | |
| options: | |
| - STABLE | |
| - BETA | |
| - ALPHA | |
| permissions: | |
| actions: read | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changelog: ${{ steps.changelog.outputs.changelog }} | |
| container: | |
| image: mcr.microsoft.com/openjdk/jdk:25-ubuntu | |
| options: --user root | |
| steps: | |
| - name: Install Git | |
| run: apt update && apt install git -y && git --version | |
| - name: Add safe directory | |
| run: git config --global --add safe.directory /__w/ForgifiedFabricAPI/ForgifiedFabricAPI | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: FabricMC/fabric-action-scripts@v2 | |
| id: changelog | |
| with: | |
| context: changelog | |
| workflow_id: release.yml | |
| - name: Validate wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-write-only: true | |
| - name: Build with Gradle | |
| run: ./gradlew clean build --stacktrace | |
| publish: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Maven | |
| task: publish | |
| url: https://maven.su5ed.dev/releases/org/sinytra/forgified-fabric-api | |
| - name: GitHub | |
| task: publishGithub | |
| url: https://github.com/Sinytra/ForgifiedFabricAPI/releases | |
| - name: CurseForge | |
| task: publishCurseforge | |
| url: https://www.curseforge.com/minecraft/mc-mods/forgified-fabric-api | |
| - name: Modrinth | |
| task: publishModrinth | |
| url: https://modrinth.com/mod/forgified-fabric-api | |
| name: Publish ${{ matrix.name }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: ${{ matrix.name }} | |
| url: ${{ matrix.url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'microsoft' | |
| java-version: '25' | |
| - name: Validate wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-read-only: true | |
| - name: Publish with Gradle | |
| run: ./gradlew clean build ${{ matrix.task }} --stacktrace | |
| env: | |
| PUBLISH_RELEASE_TYPE: ${{ inputs.release_type }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| MAVEN_URL: ${{ secrets.MAVEN_URL }} | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
| CHANGELOG: ${{ needs.build.outputs.changelog }} |