diff --git a/.github/workflows/curseforge_release.yml b/.github/workflows/curseforge_release.yml index c8c3999..286bd39 100644 --- a/.github/workflows/curseforge_release.yml +++ b/.github/workflows/curseforge_release.yml @@ -32,11 +32,19 @@ jobs: file: "${{ steps.get_mod_name.outputs.mod_name }}-${{ steps.get_version.outputs.version }}.jar" token: ${{ secrets.GITHUB_TOKEN }} + - name: Retrieve Source from Latest Release + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: "${{ github.repository }}" + version: "tags/v${{ steps.get_version.outputs.version }}" + file: "${{ steps.get_mod_name.outputs.mod_name }}-${{ steps.get_version.outputs.version }}-sources.jar" + token: ${{ secrets.GITHUB_TOKEN }} + #See https://github.com/itsmeow/curseforge-upload#usagearguments for more information - name: Create CurseForge Release uses: itsmeow/curseforge-upload@v3 with: - game_versions: "Minecraft 1.12.2,Forge" + game_versions: "Minecraft 1.12:1.12.2,Forge" game_endpoint: "minecraft" release_type: "release" changelog: "Changelog is available [here](https://github.com/${{ github.repository }}/releases/tag/v${{ steps.get_version.outputs.version }})." @@ -45,3 +53,13 @@ jobs: file_path: "${{ steps.get_mod_name.outputs.mod_name }}-${{ steps.get_version.outputs.version }}.jar" project_id: "${{ secrets.CURSEFORGE_PROJECT_ID }}" token: "${{ secrets.CURSEFORGE_API_KEY }}" + + - name: Create CurseForge Sources Release + uses: itsmeow/curseforge-upload@v3 + with: + game_endpoint: "minecraft" + release_type: "release" + parent_file_id: "${{ steps.release-curseforge.outputs.id }}" + file_path: "${{ steps.get_mod_name.outputs.mod_name }}-${{ steps.get_version.outputs.version }}-sources.jar" + project_id: "${{ secrets.CURSEFORGE_PROJECT_ID }}" + token: "${{ secrets.CURSEFORGE_API_KEY }}" \ No newline at end of file