This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
fix: Fix Guild Map Crashing (#689) #63
This file contains 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: Publish Pre Release | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
changelog: | |
name: Generate Changelog | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.changelog.outputs.tag }} | |
skipped: ${{ steps.changelog.outputs.skipped }} | |
clean_changelog: ${{ steps.changelog.outputs.clean_changelog }} | |
changelog: ${{ steps.changelog.outputs.changelog }} | |
build_number: ${{ steps.extract.outputs.build_number }} | |
release_id: ${{ steps.release.outputs.id }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PRIVATE_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install conventional-changelog-conventionalcommits | |
- name: Create changelog | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v3.17.0 | |
with: | |
github-token: ${{ secrets.PRIVATE_TOKEN }} | |
git-user-name: 'Wynntils' | |
git-user-email: 'admin@wynntils.com' | |
pre-commit: ./.github/.pre-commit.js | |
config-file-path: ./.github/.config.js | |
skip-version-file: true | |
skip-git-pull: true | |
pre-release: true | |
pre-release-identifier: beta | |
- name: Create release | |
if: ${{ steps.changelog.outputs.skipped != 'true' }} | |
id: release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.changelog.outputs.tag }} | |
body: ${{ steps.changelog.outputs.changelog }} | |
draft: true | |
prerelease: true | |
- name: Extract build information | |
id: extract | |
run: "echo build_number=`echo ${{ steps.changelog.outputs.tag }} | cut -d'.' -f4` >> $GITHUB_OUTPUT" | |
- name: Upload version information | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: build.gradle | |
build: | |
name: Build | |
needs: [changelog] # Build needs the new version number | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 # Download version information from changelog | |
with: | |
name: build | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: 8 | |
cache: "gradle" | |
- name: Build | |
env: | |
BUILD_NUMBER: ${{ needs.changelog.outputs.build_number }} | |
run: ./gradlew build | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: build/libs | |
artifact: | |
name: Rename Artifact | |
needs: [build, changelog] | |
if: ${{ needs.changelog.outputs.skipped == 'false' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build | |
path: build/libs | |
- name: Rename artifact | |
run: mv build/libs/wynntils-*.jar build/Wynntils-MC1.12.2-${{ needs.changelog.outputs.tag }}.jar | |
- name: Upload files to release | |
uses: softprops/action-gh-release@v1 | |
if: ${{ needs.changelog.outputs.skipped != 'true' }} | |
with: | |
tag_name: ${{ needs.changelog.outputs.tag }} | |
draft: true | |
prerelease: true | |
files: build/Wynntils-MC1.12.2-${{ needs.changelog.outputs.tag }}.jar | |
- name: Upload renamed artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: build/Wynntils-MC1.12.2-${{ needs.changelog.outputs.tag }}.jar | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [artifact, changelog] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build | |
- uses: Kir-Antipov/mc-publish@v3.2 | |
with: | |
modrinth-id: dU5Gb9Ab | |
modrinth-featured: true | |
modrinth-unfeature-mode: subset | |
modrinth-token: ${{ secrets.MODRINTH_API_TOKEN }} | |
curseforge-id: 303451 | |
curseforge-token: ${{ secrets.CF_API_TOKEN }} | |
files-primary: Wynntils-MC1.12.2-${{ needs.changelog.outputs.tag }}.jar | |
files-secondary: "" | |
name: Wynntils ${{ needs.changelog.outputs.tag }} | |
version: ${{ needs.changelog.outputs.tag }} | |
version-type: beta | |
changelog: ${{ needs.changelog.outputs.changelog }} | |
loaders: forge | |
game-versions: 1.12.2 | |
java: 8 | |
release-gh: | |
name: Release Github | |
if: ${{ needs.changelog.outputs.skipped != 'true' }} | |
runs-on: ubuntu-latest | |
needs: [build, changelog, artifact] | |
steps: | |
- name: Publish Release | |
uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.changelog.outputs.release_id }} |