Allow custom CF versions in main branch

This commit is contained in:
altrisi authored and GitHub committed 2021-01-14 04:25:40 +01:00
1 parent 7e35877825
commit 2e64ba9527
1 file changed
+6 -4
+6 -4
View File
@@ -10,7 +10,7 @@ jobs:
release-type: ${{ steps.type.outputs.release-type }} release-type: ${{ steps.type.outputs.release-type }}
carpet-version: ${{ steps.properties.outputs.mod_version }} carpet-version: ${{ steps.properties.outputs.mod_version }}
minecraft-version: ${{ steps.properties.outputs.minecraft_version }} minecraft-version: ${{ steps.properties.outputs.minecraft_version }}
# extra-branch: ${{ steps.properties.outputs.release-extra-branch }} Not needed anymore curse-versions: ${{ steps.properties.outputs.release-curse-versions }}
matrix-exclude-branch: ${{ steps.processmatrix.outputs.matrix-to-exclude }} matrix-exclude-branch: ${{ steps.processmatrix.outputs.matrix-to-exclude }}
extra-branch-name: ${{ steps.properties.outputs.release-extra-branch-name }} extra-branch-name: ${{ steps.properties.outputs.release-extra-branch-name }}
extra-branch-curse-version: ${{ steps.properties.outputs.release-extra-curse-version }} extra-branch-curse-version: ${{ steps.properties.outputs.release-extra-curse-version }}
@@ -29,7 +29,7 @@ jobs:
id: properties id: properties
run: | # From christian-draeger/read-properties, using the action makes it extremely messy until christian-draeger/read-properties#2 run: | # From christian-draeger/read-properties, using the action makes it extremely messy until christian-draeger/read-properties#2
path='./gradle.properties' path='./gradle.properties'
for property in mod_version minecraft_version release-extra-branch release-extra-branch-name release-extra-curse-version for property in mod_version minecraft_version release-curse-versions release-extra-branch release-extra-branch-name release-extra-curse-version
do do
result=$(sed -n "/^[[:space:]]*$property[[:space:]]*=[[:space:]]*/s/^[[:space:]]*$property[[:space:]]*=[[:space:]]*//p" "$path") result=$(sed -n "/^[[:space:]]*$property[[:space:]]*=[[:space:]]*/s/^[[:space:]]*$property[[:space:]]*=[[:space:]]*//p" "$path")
echo "$property: $result" echo "$property: $result"
@@ -56,8 +56,10 @@ jobs:
if ${{ matrix.branch == 'Snapshots'}}; then if ${{ matrix.branch == 'Snapshots'}}; then
echo "::set-output name=branchname::${{ needs.Get-Properties.outputs.extra-branch-name }}" echo "::set-output name=branchname::${{ needs.Get-Properties.outputs.extra-branch-name }}"
echo "::set-output name=version::${{ needs.Get-Properties.outputs.extra-branch-curse-version }}" echo "::set-output name=version::${{ needs.Get-Properties.outputs.extra-branch-curse-version }}"
echo "::set-output name=curse-versions::${{ needs.Get-Properties.outputs.extra-branch-curse-version }}"
else else
echo "::set-output name=version::${{ needs.Get-Properties.outputs.minecraft-version }}" echo "::set-output name=version::${{ needs.Get-Properties.outputs.minecraft-version }}"
echo "::set-output name=curse-versions::${{ needs.Get-Properties.outputs.curse-versions }}"
fi fi
- name: Checkout the sources - name: Checkout the sources
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -106,11 +108,11 @@ jobs:
changelog_type: markdown changelog_type: markdown
changelog: ${{ github.event.release.body }} changelog: ${{ github.event.release.body }}
display_name: Carpet Mod v${{ needs.Get-Properties.outputs.carpet-version }} for ${{ steps.getbranchinfo.outputs.version }} display_name: Carpet Mod v${{ needs.Get-Properties.outputs.carpet-version }} for ${{ steps.getbranchinfo.outputs.version }}
game_versions: 7499,4458,${{ steps.getbranchinfo.outputs.version }} #Fabric,Java 8,[version for the branch] game_versions: 7499,4458,${{ steps.getbranchinfo.outputs.curse-versions }} #Fabric,Java 8,[version (s) for the branch]
release_type: ${{ needs.Get-Properties.outputs.release-type }} release_type: ${{ needs.Get-Properties.outputs.release-type }}
- name: Ask Gradle to publish - name: Ask Gradle to publish
run: ./gradlew publish run: ./gradlew publish
- name: Save publish folder in action's artifacts - name: Save publish folder in action's artifacts # Remove when automated
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: Maven publishing artifacts for ${{ matrix.branch }} name: Maven publishing artifacts for ${{ matrix.branch }}