5.7 DEV build 3295 #51
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| release: | |
| types: [ published ] | |
| jobs: | |
| update_versions_txt: | |
| name: Update versions.txt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| - name: Get Download URL | |
| 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") | not)' > asset.txt | |
| jq -r '.url' asset.txt > url.txt | |
| echo "RELEASE_DOWNLOAD_URL=$(cat url.txt)" >> $GITHUB_ENV | |
| - name: Write REL release line | |
| if: ${{ github.event.release.prerelease == false }} | |
| run: | | |
| echo "REL|${{ github.event.release.tag_name }}|${{ env.RELEASE_DOWNLOAD_URL }}|https://github.com/plan-player-analytics/Plan/releases" > release_line.txt | |
| - name: Write DEV release line | |
| if: ${{ github.event.release.prerelease == true }} | |
| run: | | |
| echo "DEV|${{ github.event.release.tag_name }}|${{ env.RELEASE_DOWNLOAD_URL }}|${{ github.event.release.html_url }}" > release_line.txt | |
| - name: Append to versions.txt | |
| run: | | |
| cat versions.txt > temp.txt | |
| cat release_line.txt temp.txt > versions.txt | |
| - name: Commit and push changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| committer_name: GitHub Actions | |
| committer_email: 41898282+github-actions[bot]@users.noreply.github.com | |
| message: Update versions.txt ${{ github.event.release.name }} | |
| add: versions.txt | |
| push: origin HEAD:master | |
| update_html: | |
| name: Update html-branch | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| - name: Get git TAG | |
| id: tagName | |
| uses: olegtarasov/get-tag@v2.1 | |
| - name: Copy assets 🔧 | |
| run: | | |
| mkdir -p workingdir/Plan/src/main/resources/assets/plan | |
| mkdir -p workingdir/react/dashboard | |
| cp -r Plan/common/src/main/resources/assets/plan workingdir/Plan/src/main/resources/assets/plan | |
| cp -r Plan/react/dashboard workingdir/react/dashboard | |
| - name: Deploy 🚀 | |
| uses: JamesIves/github-pages-deploy-action@4.0.0 | |
| with: | |
| branch: html # The branch the action should deploy to. | |
| folder: workingdir # The folder the action should deploy. | |
| commit-message: ${{ steps.tagName.outputs.tag }} | |
| upload_release_ore: | |
| name: Ore Upload | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - 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") | not)' > asset.txt | |
| jq -r '.url' asset.txt > url.txt | |
| jq -r '.name' asset.txt > name.txt | |
| wget -i url.txt | |
| echo "RELEASE_JAR_PATH=$(pwd)/$(cat name.txt)" >> $GITHUB_ENV | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Publish release to Ore 🚀 | |
| env: | |
| ORE_TOKEN: ${{ secrets.ORE_API_TOKEN }} | |
| RELEASE_CHANGELOG: ${{ github.event.release.body }} | |
| RELEASE_PRERELEASE: ${{ github.event.release.prerelease }} | |
| RELEASE_JAR_PATH: ${{ env.RELEASE_JAR_PATH }} | |
| run: | | |
| ./Plan/gradlew :plugin:publishToOre | |
| upload_release_curseforge: | |
| name: CurseForge Upload | |
| 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 | |
| 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 🚀 | |
| if: ${{ github.event.release.prerelease == false }} | |
| 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 }} | |
| game_versions: "2:Java 21,77784:1.21.9,77784:1.21.10,77784:1.21.11,68441:Fabric" | |
| release_type: release | |
| relations: fabric-api:requiredDependency,luckperms:optionalDependency | |
| - name: Upload prerelease to CurseForge 🚀 | |
| if: ${{ github.event.release.prerelease == true }} | |
| 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 }} | |
| game_versions: "2:Java 21,77784:1.21.9,77784:1.21.10,77784:1.21.11,68441:Fabric" | |
| release_type: beta | |
| relations: fabric-api:requiredDependency,luckperms:optionalDependency | |
| upload_release_hangar: | |
| name: Hangar Upload | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout git repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: ⚙ Get Download URL | |
| 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") | not)' > asset.txt | |
| jq -r '.url' asset.txt > url.txt | |
| echo "RELEASE_DOWNLOAD_URL=$(cat url.txt)" >> $GITHUB_ENV | |
| - name: ☕ Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Publish release to Hangar 🚀 | |
| env: | |
| HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} | |
| RELEASE_CHANGELOG: ${{ github.event.release.body }} | |
| RELEASE_PRERELEASE: ${{ github.event.release.prerelease }} | |
| RELEASE_DOWNLOAD_URL: ${{ env.RELEASE_DOWNLOAD_URL }} | |
| run: | | |
| ./Plan/gradlew :plugin:publishPluginPublicationToHangar | |
| upload_release_modrinth: | |
| name: Modrinth Upload | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download release artifacts for upload | |
| run: | | |
| # Fetch all assets | |
| curl 'https://api.github.com/repos/plan-player-analytics/plan/releases/${{ github.event.release.id }}/assets' > all_assets.json | |
| # Download regular JAR (non-Fabric) | |
| jq -r '.[] | {name: .name, url: .browser_download_url} | select(.url | strings | test("Fabric") | not)' all_assets.json > asset_regular.txt | |
| jq -r '.url' asset_regular.txt > url_regular.txt | |
| jq -r '.name' asset_regular.txt > name_regular.txt | |
| wget -i url_regular.txt | |
| echo "REGULAR_JAR=$(cat name_regular.txt)" >> $GITHUB_ENV | |
| # Download Fabric JAR | |
| jq -r '.[] | {name: .name, url: .browser_download_url} | select(.url | strings | test("Fabric"))' all_assets.json > asset_fabric.txt | |
| jq -r '.url' asset_fabric.txt > url_fabric.txt | |
| jq -r '.name' asset_fabric.txt > name_fabric.txt | |
| wget -i url_fabric.txt | |
| echo "FABRIC_JAR=$(cat name_fabric.txt)" >> $GITHUB_ENV | |
| - name: Modrinth Upload - Plugin 🚀 | |
| uses: Kira-NT/mc-publish@v3.3 | |
| with: | |
| modrinth-id: wJQfHhxh | |
| modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
| files: ${{ env.REGULAR_JAR }} | |
| name: ${{ github.event.release.name }} | |
| version: ${{ github.event.release.tag_name }} | |
| changelog: ${{ github.event.release.body }} | |
| loaders: | | |
| bukkit | |
| spigot | |
| paper | |
| folia | |
| bungeecord | |
| waterfall | |
| velocity | |
| sponge | |
| nukkit | |
| game-versions: <=1.13 | |
| version-type: ${{ github.event.release.prerelease && 'beta' || 'release' }} | |
| - name: Modrinth Upload - Fabric 🚀 | |
| uses: Kira-NT/mc-publish@v3.3 | |
| with: | |
| modrinth-id: plan | |
| modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
| files: ${{ env.FABRIC_JAR }} | |
| name: ${{ github.event.release.name }} | |
| version: ${{ github.event.release.tag_name }} | |
| changelog: ${{ github.event.release.body }} | |
| loaders: | | |
| fabric | |
| game-versions: <=1.21.9 | |
| version-type: ${{ github.event.release.prerelease && 'beta' || 'release' }} | |
| dependencies: | | |
| P7dR8mSH(required) | |
| Vebnzrzj(optional) |