Plan/.github/workflows/curseforge-upload.yml

57 lines
2.5 KiB
YAML
Raw Normal View History

2021-07-30 06:09:45 +02:00
name: Upload artifact to CurseForge
on:
release:
2021-08-20 06:44:52 +02:00
types: [ published ]
2021-07-30 06:09:45 +02:00
jobs:
upload_release:
if: ${{ github.event.release.prerelease == false }}
runs-on: ubuntu-latest
steps:
- name: Download release artifact for upload
run: |
curl 'https://api.github.com/repos/plan-player-analytics/plan/releases/${{ github.event.release.id }}/assets' | jq -r '.[] | {name: .name, url: .browser_download_url} | select(.url | strings | test("Fabric"))' > asset.txt
2021-07-30 06:09:45 +02:00
jq -r '.url' asset.txt > url.txt
jq -r '.name' asset.txt > name.txt
wget -i url.txt
echo "JAR_FILENAME=$(cat name.txt)" >> $GITHUB_ENV
- name: Upload release to CurseForge 🚀
uses: itsmeow/curseforge-upload@master
with:
token: ${{ secrets.CF_API_TOKEN }}
project_id: 508727
game_endpoint: minecraft
file_path: ${{ env.JAR_FILENAME }}
changelog: ${{ github.event.release.body }}
changelog_type: markdown
display_name: ${{ github.event.release.name }}
2022-04-18 11:47:01 +02:00
game_versions: "2:Java 16,2:Java 17,73242:1.17,73242:1.17.1,Fabric,73250:1.18,73250:1.18.1,9008:1.18.2"
2021-07-30 06:09:45 +02:00
release_type: release
relations: fabric-api:requiredDependency,luckperms:optionalDependency
upload_prerelease:
if: ${{ github.event.release.prerelease == true }}
runs-on: ubuntu-latest
steps:
- name: Download release artifact for upload
run: |
curl 'https://api.github.com/repos/plan-player-analytics/plan/releases/${{ github.event.release.id }}/assets' | jq -r '.[] | {name: .name, url: .browser_download_url} | select(.url | strings | test("Fabric"))' > asset.txt
2021-07-30 06:09:45 +02:00
jq -r '.url' asset.txt > url.txt
jq -r '.name' asset.txt > name.txt
wget -i url.txt
echo "JAR_FILENAME=$(cat name.txt)" >> $GITHUB_ENV
- name: Upload prerelease to CurseForge 🚀
uses: itsmeow/curseforge-upload@master
with:
token: ${{ secrets.CF_API_TOKEN }}
project_id: 508727
game_endpoint: minecraft
file_path: ${{ env.JAR_FILENAME }}
changelog: ${{ github.event.release.body }}
changelog_type: markdown
display_name: ${{ github.event.release.name }}
2022-04-18 11:47:01 +02:00
game_versions: "2:Java 16,2:Java 17,73242:1.17,73242:1.17.1,Fabric,73250:1.18,73250:1.18.1,9008:1.18.2"
release_type: beta
2021-07-30 06:09:45 +02:00
relations: fabric-api:requiredDependency,luckperms:optionalDependency