From 61bb63dda6b209eec9ca670b423d443eb1895973 Mon Sep 17 00:00:00 2001 From: Apehum Date: Mon, 20 Feb 2023 05:28:39 +0800 Subject: [PATCH] ci: auto-publish --- .github/workflows/publish.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..228fae4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Publish + +on: + push: + branches: + - main + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: build + + - name: Publish to Modrinth/CurseForge + uses: Apehum/mc-publish@v1.1 + with: + name: 'PV Addon Broadcast' + + # modrinth-unfeature-mode: 'none' + # modrinth-id: 1bZhdhsH + # modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + + # curseforge-id: 394468 + # curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} + + - name: Publish to GitHub + uses: Apehum/mc-publish@v1.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + github-generate-changelog: false