Skip to content

Commit

Permalink
Update BuildMultiplatform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Dec 20, 2024
1 parent 3f6821b commit 9052b2a
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions .github/workflows/BuildMultiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ jobs:
# -- PROJECT SUFFIX --
projectsuffix=build.${{ github.run_number }}
if [[ ${{ startsWith(github.ref, 'refs/tags/v') }} == true ]]; then
echo "projectsuffix=$latest_tag" >> $GITHUB_OUTPUT
echo "📃 projectsuffix=$latest_tag"
echo -e "📃 projectsuffix=$latest_tag" >> $GITHUB_STEP_SUMMARY
else
echo "projectsuffix=build.${{ github.run_number }}" >> $GITHUB_OUTPUT
echo "📃 projectsuffix=build.${{ github.run_number }}"
echo -e "📃 projectsuffix=build.${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
projectsuffix=$latest_tag
fi
echo "projectsuffix=$projectsuffix" >> $GITHUB_OUTPUT
echo "📃 projectsuffix=$projectsuffix"
echo -e "📃 projectsuffix=$projectsuffix" >> $GITHUB_STEP_SUMMARY
# -- RELEASE TYPE
rel_type="release"
Expand All @@ -106,6 +106,7 @@ jobs:
fi
echo "📃 latest_tagged_commit=$latest_tagged_commit"
echo -e "📃 latest_tagged_commit=$latest_tagged_commit" >> $GITHUB_STEP_SUMMARY
git show $latest_tagged_commit:./pakku-lock.json > ./pakku-lock-prev.json
Expand All @@ -115,8 +116,6 @@ jobs:
# -- OUTPUT DIFF --
cat PROJECTS_DIFF.md >> $GITHUB_STEP_SUMMARY
{
echo 'diff<<EOF'
cat PROJECTS_DIFF.md
Expand All @@ -134,11 +133,13 @@ jobs:
# Get & upload @news@
news=$(grep -Pzo '\@news\@\{\K[\s]\n*([\s\S]*)\n(?=\})' $changelog | sed '/^$/d' | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
echo news=$news >> $GITHUB_OUTPUT
echo -e "$news" >> $GITHUB_STEP_SUMMARY
# Replace @news@
perl -0777 -i -pe "s/\@news\@\{[\s]\n*([\s\S]*)\n\}\n/$news/g" $changelog
echo -e "***" >> $GITHUB_STEP_SUMMARY
cat $changelog >> $GITHUB_STEP_SUMMARY
# Finally, Rename changelog
mv $changelog "CHANGELOG-$projectsuffix.md"
Expand Down Expand Up @@ -202,13 +203,11 @@ jobs:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifact Changelog
uses: actions/download-artifact@v4
- uses: actions/download-artifact@v4
with:
name: changelog

- name: Download Artifact JVM Jar
uses: actions/download-artifact@v4
- uses: actions/download-artifact@v4
with:
name: jvm-jar
path: build
Expand All @@ -217,14 +216,33 @@ jobs:
with:
modrinth-id: ${{ env.MR_PROJECT_ID }}
modrinth-token: ${{ secrets.MR_TOKEN }}
files: build/modrinth/**

game-versions: 1.12.2
loaders: forge

changelog-file: ./CHANGELOG-*.md

- uses: Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: ${{ env.CF_PROJECT_ID }}
curseforge-token: ${{ secrets.CF_TOKEN }}
files: build/curseforge/**

game-versions: 1.12.2
loaders: forge

changelog-file: ./CHANGELOG-*.md

- uses: Kir-Antipov/mc-publish@v3.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: build/**

files: |
game-versions: 1.12.2
loaders: forge

changelog-file: ./CHANGELOG-*.md

update-changelogs:
name: Update Changelogs
Expand Down

0 comments on commit 9052b2a

Please sign in to comment.