Release #4
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: | |
| # title: | |
| # description: 'Release Title' | |
| # required: true | |
| # type: string | |
| # tag: | |
| # description: 'Release Tag' | |
| # required: true | |
| # type: string | |
| changelog: | |
| description: 'Release Changelog' | |
| required: true | |
| type: string | |
| type: | |
| type: choice | |
| description: 'Release Type' | |
| required: true | |
| options: | |
| - ALPHA | |
| - BETA | |
| - STABLE | |
| dry_run: | |
| type: boolean | |
| description: 'Dry Run' | |
| required: true | |
| default: true | |
| release_github: | |
| type: boolean | |
| description: 'Github Release' | |
| required: true | |
| default: false | |
| release_modrinth: | |
| type: boolean | |
| description: 'Modrinth Release' | |
| required: true | |
| default: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: benjlevesque/[email protected] | |
| id: short-sha | |
| - name: Set up JDK | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
| settings-path: ${{ github.workspace }} # location for the settings.xml file | |
| - run: chmod +x ./gradlew | |
| - name: chiseledBuild | |
| run: ./gradlew chiseledBuild --no-daemon | |
| # - name: Find jars | |
| # id: find_jars | |
| # run: | | |
| # { | |
| # echo 'jar_files<<EOF' | |
| # find build/libs -name "*.jar" | |
| # echo EOF | |
| # } >> "$GITHUB_OUTPUT" | |
| # | |
| # - name: Draft Release | |
| # uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 | |
| # with: | |
| # draft: true | |
| # name: ${{ inputs.title }} | |
| # tag_name: ${{ inputs.tag }} | |
| # body: ${{ inputs.changelog }} | |
| # files: ${{ steps.find_jars.outputs.jar_files }} | |
| # prerelease: ${{ inputs.type == 'ALPHA' }} | |
| - name: chiseledPublishMods | |
| env: | |
| RELEASE_CHANGELOG: ${{ inputs.changelog }} | |
| RELEASE_TYPE: ${{ inputs.type }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }} | |
| RELEASE_GITHUB: ${{ inputs.release_github }} | |
| RELEASE_MODRINTH: ${{ inputs.release_modrinth }} | |
| DRY_RUN: ${{ inputs.dry_run }} | |
| run: ./gradlew chiseledPublishMods --no-daemon | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "publishMods" | |
| path: ./build/publishMods |