Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
way2muchnoise authored Apr 1, 2024
1 parent e49064f commit de5042c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: 'Build'
on:
push:

env:
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
CURSE_KEY: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}

permissions:
contents: write

Expand All @@ -11,15 +15,23 @@ jobs:
runs-on: ubuntu-latest

steps:
# Setup
- uses: actions/checkout@v3
- name: Create changelog
run: export CHANGELOG="$(git log ${{ github.event.before }}..${{ github.event.after }} --pretty=format:"\[[%h](https://github.com/${{ GITHUB_REPOSITORY }}/commit/%H)\] %s (%cn) ")"
- name: Set up JDK 17
uses: actions/setup-java@v3
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
Expand Down

0 comments on commit de5042c

Please sign in to comment.