Publish #55
Workflow file for this run
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: | |
inputs: | |
release-title: | |
description: 'Release Title' | |
required: false | |
mod-version: | |
description: 'Mod Version' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NEXT_VERSION: ${{github.ref_name}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Bump version | |
run: ./.github/scripts/bumpVersion.sh | |
env: | |
VERSION: ${{ inputs.mod-version }} | |
- name: Commit version bump | |
uses: EndBug/add-and-commit@v7 | |
with: | |
add: ./gradle.properties | |
message: ${{ format('[CI] Bump version to {0}', inputs.mod-version) }} | |
branch: main | |
- name: Publish to GitHub | |
uses: elgohr/Github-Release-Action@v4 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
title: ${{ github.event.inputs.release-title }} | |
- name: Publish to CurseForge | |
run: | | |
chmod +x ./gradlew | |
./gradlew build curseforge --stacktrace | |
env: | |
ORG_GRADLE_PROJECT_curseforgeToken: ${{ secrets.CURSEFORGE_API_KEY }} | |
- name: Publish to Modrinth | |
run: | | |
chmod +x ./gradlew | |
./gradlew build modrinth --stacktrace | |
env: | |
ORG_GRADLE_PROJECT_modrinthToken: ${{ secrets.MODRINTH_API_KEY }} |