Skip to content

Commit

Permalink
ci: use BrycensRanch/read-properties-action for properties file rea…
Browse files Browse the repository at this point in the history
…ding
  • Loading branch information
Fallen-Breath committed Oct 16, 2024
1 parent 2af7093 commit 55417f4
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,17 @@ jobs:
- name: Read common properties
id: properties_g
uses: christian-draeger/read-properties@1.1.1
uses: BrycensRanch/read-properties-action@v1
with:
path: gradle.properties
properties: 'mod_name mod_version'
file: gradle.properties
all: true

- name: Read version-specific properties
id: properties_v
uses: christian-draeger/read-properties@1.1.1
uses: BrycensRanch/read-properties-action@v1
with:
path: ${{ format('versions/{0}/gradle.properties', matrix.subproject) }}
properties: 'minecraft_version game_versions'

- name: Fix game version
id: game_versions
run: |
# Fixed \n in game_versions isn't parsed by christian-draeger/read-properties as a line separator
echo 'value<<EOF' >> $GITHUB_OUTPUT
echo -e "${{ steps.properties_v.outputs.game_versions }}" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
file: ${{ format('versions/{0}/gradle.properties', matrix.subproject) }}
all: true

- name: Prepare file information
id: file_info
Expand Down Expand Up @@ -196,7 +188,7 @@ jobs:
version-type: release

loaders: fabric
game-versions: ${{ steps.game_versions.outputs.value }}
game-versions: ${{ steps.properties_v.outputs.game_versions }}
game-version-filter: any
dependencies: '' # declare the dependencies explicitly, so mc-publish won't try to load from fabric.mod.json

Expand Down

0 comments on commit 55417f4

Please sign in to comment.