Publish #9
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 | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
build: | |
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' # @AnthonyWC on GH, https://github.com/orgs/community/discussions/26724#discussioncomment-3253096 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Environment Variables | |
run: env | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
distribution: "temurin" | |
java-version: 21 | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Datagen | |
run: ./gradlew chiseledRunDatagen | |
- name: Build and Publish | |
run: ./gradlew chiseledPublishMods | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MODRINTH_TOKEN: $${{ secrets.MODRINTH_TOKEN }} | |
DISCORD_WEBHOOK: $${{ secrets.DISCORD_WEBHOOK }} | |
DISCORD_WEBHOOK_DRY_RUN: $${{ secrets.DISCORD_WEBHOOK_DRY_RUN }} |