Finish 21.1/next #3
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 Curseforge Alpha Build | ||
|
Check failure on line 1 in .github/workflows/release-cf-alpha.yml
|
||
| env: | ||
| GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}" | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| diagnostic_mode: | ||
| description: Diagnostic Mode | ||
| type: boolean | ||
| default: false | ||
| required: true | ||
| jobs: | ||
| vars: | ||
| name: Get Variables | ||
| runs-on: ubuntu-22.04 | ||
| outputs: | ||
| cf_project: ${{steps.gradle_props.outputs.cf_project}} | ||
| mcVersion: ${{steps.gradle_props.outputs.minecraft_version}} | ||
| forgeVersion: ${{steps.gradle_props.outputs.forge_version}} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Read MC and Forge versions | ||
| id: gradle_props | ||
| uses: christian-draeger/[email protected] | ||
| with: | ||
| path: "gradle.properties" | ||
| properties: "minecraft_version forge_version cf_project" | ||
| get-package-info: | ||
| name: Get Latest Package Info | ||
| runs-on: ubuntu-22.04 | ||
| needs: [ publish-gh-package ] | ||
| outputs: | ||
| version: ${{ steps.download-info.outputs.version }} | ||
| steps: | ||
| - name: Download Package Info | ||
| id: download-info | ||
| uses: compactmods/[email protected] | ||
| env: | ||
| GQL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| owner: compactmods | ||
| repo: compactcrafting | ||
| group: dev.compactmods.compactcrafting | ||
| filter: "^compactcrafting-(?:[\\d\\.]+)-nightly.jar$" | ||
| outputFile: compactcrafting-nightly.json | ||
| - name: Debug output | ||
| run: | | ||
| echo "Version: ${{ steps.download-info.outputs.version }}" | ||
| cat compactcrafting-nightly.json | ||
| - name: Read info into variable [latest] | ||
| id: info | ||
| run: echo "latestJson=$(cat compactcrafting-nightly.json)" >> $GITHUB_OUTPUT | ||
| - name: Download JAR and prepare artifacts | ||
| run: | | ||
| mkdir release | ||
| curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name}}" | ||
| mv compactcrafting-nightly.json release/compactcrafting-nightly.json | ||
| - name: Add Artifact | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: release | ||
| path: release | ||
| release: | ||
| name: Release | ||
| needs: [ vars, get-package-info ] | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Grab JAR and Info | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: release | ||
| path: . | ||
| - name: Read info into variable [latest] | ||
| id: info | ||
| run: echo "latestJson=$(cat compactcrafting-nightly.json)" >> $GITHUB_OUTPUT | ||
| - name: Create CurseForge Release | ||
| uses: itsmeow/curseforge-upload@master | ||
| with: | ||
| token: ${{ secrets.CF_API_TOKEN }} | ||
| project_id: ${{ needs.vars.outputs.cf_project }} | ||
| game_endpoint: minecraft | ||
| file_path: ${{ fromJson(steps.info.outputs.latestJson)[0].name}} | ||
| changelog: "This is a nightly build. It is not production-modpack ready and no support will be provided; it is intended for early testing and feedback." | ||
| changelog_type: markdown | ||
| game_versions: java:Java 17,Forge | ||
| release_type: alpha | ||