diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 263673a00..48d4ef386 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,9 +18,8 @@ jobs: outputs: project_name: ${{ steps.info.outputs.project_name }} project_version: ${{ steps.info.outputs.project_version }} - mcversion: ${{ steps.info.outputs.mcversion }} - tag: ${{ steps.version.outputs.tag }} - changelog: ${{ steps.changelog.outputs.description }} + MC_VERSION: ${{ steps.info.outputs.mc_version }} + CHANGELOG: ${{ steps.changelog.outputs.description }} steps: - name: Checkout @@ -46,8 +45,8 @@ jobs: project_name=`echo $(jq -r '.name' <<< "$manifestjson")` echo "project_name=$project_name" >> $GITHUB_OUTPUT - mcversion=`echo $(jq -r '.minecraft.version' <<< "$manifestjson")` - echo "mcversion=$mcversion" >> $GITHUB_OUTPUT + mc_version=`echo $(jq -r '.minecraft.version' <<< "$manifestjson")` + echo "mc_version=$mc_version" >> $GITHUB_OUTPUT if [[ ${{ startsWith(github.ref, 'refs/tags/') }} == true ]]; then echo "project_version=${{ steps.version.outputs.tag }}" >> $GITHUB_OUTPUT @@ -177,10 +176,9 @@ jobs: if: startsWith(github.ref, 'refs/tags/') uses: ./.github/workflows/release.yml with: - project_name: ${{ needs.modpack-info.outputs.project_name }} - project_version: ${{ needs.modpack-info.outputs.project_version }} - mcversion: ${{ needs.modpack-info.outputs.mcversion }} - tag: ${{ needs.modpack-info.outputs.tag }} - changelog: ${{ needs.modpack-info.outputs.changelog }} + PROJECT_NAME: ${{ needs.modpack-info.outputs.project_name }} + PROJECT_VERSION: ${{ needs.modpack-info.outputs.project_version }} + MC_VERSION: ${{ needs.modpack-info.outputs.mc_version }} + CHANGELOG: ${{ needs.modpack-info.outputs.changelog }} secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcfcc7005..472b0bfb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,19 +4,16 @@ run-name: "Release #${{ github.run_number }}" on: workflow_call: inputs: - project_name: + PROJECT_NAME: required: true type: string - project_version: + PROJECT_VERSION: required: true type: string - mcversion: + MC_VERSION: required: true type: string - tag: - required: true - type: string - changelog: + CHANGELOG: required: true type: string @@ -40,12 +37,12 @@ jobs: - name: Download cf modpack uses: actions/download-artifact@v4.1.0 with: - name: ${{ inputs.project_name }}-${{ inputs.project_version }}-cf + name: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-cf - name: Download serverpack uses: actions/download-artifact@v4.1.0 with: - name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server + name: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-server - name: Upload Curseforge id: cf_release @@ -53,13 +50,13 @@ jobs: with: api-token: ${{ secrets.CF_API_TOKEN }} project-id: ${{ env.CF_PROJECT_ID }} - modpack-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-cf.zip - modpack-server-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-server.zip - changelog: ${{ inputs.changelog }} + modpack-path: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-cf.zip + modpack-server-path: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-server.zip + changelog: ${{ inputs.CHANGELOG }} changelog-format: markdown - game-version: ${{ inputs.mcversion }} - display-name: ${{ inputs.project_name }}-${{ inputs.project_version }} - server-display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server + game-version: ${{ inputs.MC_VERSION }} + display-name: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }} + server-display-name: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-server release-type: ${{ env.RELEASE_TYPE }} - name: Send Discord message @@ -67,11 +64,18 @@ jobs: with: webhook-url: ${{secrets.RELEASES_1_20}} username: "TerraFirmaGreg" - avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png" - embed-title: Release ${{ inputs.project_version }} - embed-url: https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/${{ inputs.tag }} - embed-description: ${{ inputs.changelog }} - embed-color: 5814783 + avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/curseforge_logo.png" + embed-title: Release ${{ inputs.PROJECT_VERSION }} + embed-url: https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/${{ inputs.PROJECT_VERSION }} + embed-thumbnail-url: https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png + embed-description: | + **Release Type**: `${{ env.RELEASE_TYPE }}` + **GameVersion**: `${{ inputs.MC_VERSION }}` + **Website Link**: [CurseForge](https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/${{ steps.cf_release.outputs.id }}) + + **Changelog** + ```${{ inputs.CHANGELOG }}``` + embed-color: "#57F287" release-github: name: Deploy to GitHub @@ -87,13 +91,13 @@ jobs: with: prerelease: false generate_release_notes: true - name: ${{ inputs.project_version }} - body: ${{ inputs.changelog }} + name: ${{ inputs.PROJECT_VERSION }} + body: ${{ inputs.CHANGELOG }} files: | - ${{ inputs.project_name }}-${{ inputs.project_version }}-cf.zip - ${{ inputs.project_name }}-${{ inputs.project_version }}-mmc.zip - ${{ inputs.project_name }}-${{ inputs.project_version }}-server.zip - tag_name: ${{ inputs.tag }} + ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-cf.zip + ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-mmc.zip + ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-server.zip + tag_name: ${{ inputs.PROJECT_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -124,13 +128,13 @@ jobs: # with: # api-token: ${{ secrets.MODRINTH_API_TOKEN }} # project-id: ${{ env.MODRINTH_PROJECT_ID }} - # modpack-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-mrd.zip - # modpack-server-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-server.zip - # changelog: "${{ inputs.changelog }}" + # modpack-path: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-mrd.zip + # modpack-server-path: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-server.zip + # changelog: "${{ inputs.CHANGELOG }}" # changelog-format: markdown # game-version: ${{ inputs.mcversion }} - # display-name: ${{ inputs.project_name }}-${{ inputs.project_version }} - # server-display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server + # display-name: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }} + # server-display-name: ${{ inputs.PROJECT_NAME }}-${{ inputs.PROJECT_VERSION }}-server # release-type: ${{ env.RELEASE_TYPE }} close-fixed-issues: @@ -145,7 +149,7 @@ jobs: uses: juraj-hrivnak/close-issues-based-on-label@master env: LABEL: "2. status: fixed in dev" - VERSION: ${{ inputs.tag }} + VERSION: ${{ inputs.PROJECT_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index cfc5bd8c2..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Test -run-name: "Test #${{ github.run_number }}" - -on: - push: - branches: - - main - -jobs: - modpack-info: - name: Modpack Info - runs-on: ubuntu-latest - outputs: - project_name: ${{ steps.info.outputs.project_name }} - project_version: ${{ steps.info.outputs.project_version }} - mcversion: ${{ steps.info.outputs.mcversion }} - tag: ${{ steps.version.outputs.tag }} - changelog: ${{ steps.changelog.outputs.description }} - - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - # - name: Get tag - # id: version - # uses: "WyriHaximus/github-action-get-previous-tag@v1.3.0" - # with: - # fallback: tag_not_found - - # - name: Modpack info - # id: info - # shell: bash - # run: | - # set +e - - # if [ ! -f ./.github/buildtools/modpack/manifest.json ]; then - # echo "::error::Could not find manifest.json" && exit 1 - # fi - # manifestjson=`cat ./.github/buildtools/modpack/manifest.json` - - # project_name=`echo $(jq -r '.name' <<< "$manifestjson")` - # echo "project_name=$project_name" >> $GITHUB_OUTPUT - - # mcversion=`echo $(jq -r '.minecraft.version' <<< "$manifestjson")` - # echo "mcversion=$mcversion" >> $GITHUB_OUTPUT - - # if [[ ${{ startsWith(github.ref, 'refs/tags/') }} == true ]]; then - # echo "project_version=${{ steps.version.outputs.tag }}" >> $GITHUB_OUTPUT - # else - # echo "project_version=build.${{ github.run_number }}" >> $GITHUB_OUTPUT - # fi - - - name: Changelog Parser - id: changelog - uses: coditory/changelog-parser@v1.0.2 - with: - path: CHANGELOG.md - - - name: Send Discord message - uses: tsickert/discord-webhook@v5.4.0 - with: - webhook-url: ${{secrets.RELEASES_1_20}} - username: "TerraFirmaGreg" - avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/curseforge_logo.png" - embed-title: Release 0.4.2 - embed-url: https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/0.4.2 - embed-thumbnail-url: https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png - embed-description: | - **Release Type**: `BETA` - **GameVersion**: `1.20.1` - **Website Link**: [CurseForge](https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/5010505) - - **Changelog** - ```${{ steps.changelog.outputs.description }}``` - embed-color: 15430476