Release #44
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: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_type: | ||
description: 'The published artifact release type' | ||
required: false | ||
default: 'STABLE' | ||
type: choice | ||
options: | ||
- STABLE | ||
- BETA | ||
- ALPHA | ||
permissions: | ||
actions: read | ||
contents: write | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
changelog: ${{ steps.changelog.outputs.changelog }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: FabricMC/fabric-action-scripts@v2 | ||
id: changelog | ||
with: | ||
context: changelog | ||
workflow_id: release.yml | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'microsoft' | ||
java-version: '17' | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
gradle-home-cache-excludes: | | ||
gradle.properties | ||
- name: Build with Gradle | ||
run: ./gradlew clean build --stacktrace | ||
publish: | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Maven | ||
environment: maven | ||
task: publish | ||
- name: GitHub | ||
environment: github | ||
task: publishGithub | ||
- name: CurseForge | ||
environment: curseforge | ||
task: publishCurseforge | ||
- name: Modrinth | ||
environment: modrinth | ||
task: publishModrinth | ||
name: Publish ${{ matrix.name }} | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'microsoft' | ||
java-version: '17' | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
cache-read-only: true | ||
gradle-home-cache-cleanup: true | ||
gradle-home-cache-excludes: | | ||
gradle.properties | ||
- name: Publish with Gradle | ||
run: ./gradlew ${{ matrix.task }} --stacktrace | ||
env: | ||
PUBLISH_RELEASE_TYPE: ${{ inputs.release_type }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
MAVEN_URL: ${{ secrets.MAVEN_URL }} | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD } | ||
Check failure on line 93 in .github/workflows/release.yml GitHub Actions / ReleaseInvalid workflow file
|
||
CHANGELOG: ${{ needs.build.outputs.changelog }} |