|
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | 12 | - name: Checkout 🛎️ |
13 | | - uses: actions/checkout@v3 |
| 13 | + uses: actions/checkout@v4 |
14 | 14 | - name: Get Download URL |
15 | 15 | run: | |
16 | 16 | 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") | not)' > asset.txt |
|
43 | 43 |
|
44 | 44 | steps: |
45 | 45 | - name: Checkout 🛎️ |
46 | | - uses: actions/checkout@v3 |
| 46 | + uses: actions/checkout@v4 |
47 | 47 | - name: Get git TAG |
48 | 48 | id: tagName |
49 | 49 | uses: olegtarasov/get-tag@v2.1 |
@@ -136,3 +136,30 @@ jobs: |
136 | 136 | game_versions: "2:Java 21,77784:1.21.9,77784:1.21.10,77784:1.21.11,68441:Fabric" |
137 | 137 | release_type: beta |
138 | 138 | relations: fabric-api:requiredDependency,luckperms:optionalDependency |
| 139 | + |
| 140 | + upload_release_hangar: |
| 141 | + name: Hangar Upload |
| 142 | + runs-on: ubuntu-latest |
| 143 | + steps: |
| 144 | + - name: 📥 Checkout git repository |
| 145 | + uses: actions/checkout@v4 |
| 146 | + with: |
| 147 | + fetch-depth: 0 |
| 148 | + - name: ⚙ Get Download URL |
| 149 | + run: | |
| 150 | + 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") | not)' > asset.txt |
| 151 | + jq -r '.url' asset.txt > url.txt |
| 152 | + echo "RELEASE_DOWNLOAD_URL=$(cat url.txt)" >> $GITHUB_ENV |
| 153 | + - name: ☕ Setup JDK |
| 154 | + uses: actions/setup-java@v4 |
| 155 | + with: |
| 156 | + distribution: 'temurin' |
| 157 | + java-version: '25' |
| 158 | + - name: Publish release to Hangar 🚀 |
| 159 | + env: |
| 160 | + HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} |
| 161 | + RELEASE_CHANGELOG: ${{ github.event.release.body }} |
| 162 | + RELEASE_PRERELEASE: ${{ github.event.release.prerelease }} |
| 163 | + RELEASE_DOWNLOAD_URL: ${{ env.RELEASE_DOWNLOAD_URL }} |
| 164 | + run: | |
| 165 | + ./gradlew :plugin:publishPluginPublicationToHangar |
0 commit comments