bump some versions #5
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: 'Build' | |
on: | |
push: | |
env: | |
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }} | |
CURSE_KEY: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }} | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create changelog | |
run: | | |
{ | |
echo 'CHANGELOG<<EOF' | |
git log ${{ github.event.before }}...${{ github.event.after }} --pretty=format:"\[[%h](https://github.com/$GITHUB_REPOSITORY/commit/%H)\] %s (%cn) " | |
echo "" | |
echo EOF | |
} >> "$GITHUB_ENV" | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
# Build | |
- name: Build with Gradle | |
run: ./gradlew clean build | |
# Publish | |
- name: Publish CurseForge | |
run: ./gradlew :Forge:publishCurseForge :Fabric:publishCurseForge :NeoForge:publishCurseForge | |
- name: Publish Modrinth | |
run: ./gradlew :Forge:modrinth :Fabric:modrinth :NeoForge:modrinth | |
- uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
path: output/*[^shadow].jar |