Skip to content

Commit

Permalink
ci: Make target loaders configurable in publish-release
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Oct 23, 2024
1 parent 4a7d404 commit 9fe40f1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ name: publish-release
on:
workflow_dispatch:
inputs:
bump:
description: 'The bump in version for this release'
forge:
description: 'Forge'
required: true
type: choice
default: patch
options:
- major
- minor
- patch
type: boolean
default: true
fabric:
description: 'Fabric'
required: true
type: boolean
default: true
neoforge:
description: 'NeoForge'
required: true
type: boolean
default: true

jobs:
create-release:
Expand All @@ -20,7 +26,7 @@ jobs:
version: ${{ steps.bump-version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Extracting version from properties
shell: bash
run: echo "version=$(cat gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT
Expand All @@ -29,7 +35,7 @@ jobs:
uses: TwelveIterationMods/bump-version@v1
with:
version: ${{ steps.extract-version.outputs.version }}
bump: ${{ inputs.bump }}
bump: patch
id: bump-version
- name: Updating version properties
run: |
Expand Down Expand Up @@ -57,15 +63,16 @@ jobs:
- loader: common
site: modrinth
fail-fast: false
if: ${{ inputs[matrix.loader] }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.ref }}
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
Expand Down

0 comments on commit 9fe40f1

Please sign in to comment.