diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 5b88330..0cd7997 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -1,8 +1,7 @@ name: Publish to CoastalCommits and Modrinth on: - push: - tags: - - '*' + release: + types: [published] jobs: Build and Publish: @@ -14,33 +13,17 @@ jobs: with: fetch-depth: 0 - - name: Set environment variables - uses: actions/env@v2 - - - name: Set up Go - uses: actions/go@v2 - with: - go-version: '>=1.20.1' - - name: ZIP the datapack run: | - zip -r BetterCombatCompat-$CI_REF_NAME.zip data pack.mcmeta pack.png LICENSE README.md - - - name: Release to CoastalCommits - uses: actions/release@main - with: - name: BetterCombatCompat-$CI_REF_NAME - files: |- - BetterCombatCompat-$CI_REF_NAME.zip - api_key: ${{ secrets.COASTALCOMMITSTOKEN }} + zip -r BetterCombatCompat-${{ github.event.release.tag_name }}.zip data pack.mcmeta pack.png LICENSE README.md - name: Publish to Modrinth uses: actions/modrinth-publish@1.0.0 with: token: ${{ secrets.MODRINTH_STAGING_RELEASE_TOKEN }} project: ${{ vars.MODRINTH_PROJECT_ID }} - changelog: ${{ github.event.head_commit.message }} + changelog: ${{ github.event.release.body }} loaders: 'datapack' - file: BetterCombatCompat-$CI_REF_NAME.zip + file: BetterCombatCompat-${{ github.event.release.tag_name }}.zip dependencies: "[{'project_id': `5sy6g3kz`, 'dependency_type': 'required'}]" api-domain: 'staging-api.modrinth.com'