From c4c98ceeb4db9c3611c37195634e03223cb24771 Mon Sep 17 00:00:00 2001 From: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com> Date: Sun, 22 Sep 2024 21:28:47 -0300 Subject: [PATCH] chore: Add github actions This should work right? Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com> --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a789bfe --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Publish mod + +on: + push: + branches: [ "main" ] + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Set up JDK 21 + uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0 + with: + java-version: '21' + distribution: 'temurin' + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - run: ./gradlew build modrinth + env: + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + - run: ./gradlew build publish + env: + MAVEN_REPO: ${{ secrets.MAVEN_REPO }} + MAVEN_AUTH_HEADER: ${{ secrets.MAVEN_AUTH_HEADER }} + MAVEN_AUTH_TOKEN: ${{ secrets.MAVEN_AUTH_TOKEN }}