Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikaro committed Dec 21, 2024
1 parent 1492bc6 commit a29a19e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ body:
attributes:
label: "Please provide a link to your latest.log, if relevant."
description: |
"The `latest.log` file is found in `/logs\` within the modpack files."
"The `latest.log` file is found in `/logs/` within the modpack files."
"We recommend always using https://mclo.gs/."
> [!CAUTION]
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ jobs:
shell: bash
run: |
if ! git ls-tree -r ${{ steps.latest_tag.outputs.tag }} -- ./pakku-lock.json &> /dev/null; then
echo "❌ File pakku-lock.json not found in previous tag" && exit 1
echo "❌ File pakku-lock.json not found in previous tag"
else
echo "✔️ File pakku-lock.json found in previous tag"
fi
- name: 📁 Copy pakku-lock.json from previous tag
id: copy_pakku_lock_prev
if: steps.check_pakku_lock_prev.conclusion == 'success'
shell: bash
run: |
git show tags/${{ steps.latest_tag.outputs.tag }}:./pakku-lock.json > ./pakku-lock-prev.json
Expand All @@ -88,13 +89,15 @@ jobs:
- name: 📦 Download pakku.jar
id: download_pakku
if: steps.check_pakku_lock_prev.conclusion == 'success'
shell: bash
run: |
curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
echo "✔️ Downloaded pakku.jar "
- name: 🔄 Run pakku diff
id: pakku_diff
if: steps.check_pakku_lock_prev.conclusion == 'success'
shell: bash
run: |
java -jar pakku.jar diff -v --markdown PROJECTS_DIFF.md ./pakku-lock-prev.json ./pakku-lock.json
Expand All @@ -106,6 +109,7 @@ jobs:
- name: 📝 Read PROJECTS_DIFF.md to variable
id: read_diff
if: steps.check_pakku_lock_prev.conclusion == 'success'
shell: bash
run: |
echo "📝 Reading PROJECTS_DIFF.md to variable..."
Expand Down Expand Up @@ -145,7 +149,7 @@ jobs:

- name: 📈 Upload Diff
id: upload_diff
if: ${{ steps.read_diff.outputs.diff != '' }}
if: ${{ steps.read_diff.outputs.diff != '' }} && steps.check_pakku_lock_prev.conclusion == 'success'
uses: actions/[email protected]
with:
name: Mods-diff
Expand Down Expand Up @@ -422,25 +426,23 @@ jobs:

- name: Format diff
id: format_diff
run: |
if [ -n "${{ needs.info.outputs.diff }}" ]; then
value="```markdown
if: ${{ needs.info.outputs.diff != '' }}
uses: roamingowl/[email protected]
with:
template: |
```markdown
${{ needs.info.outputs.diff }}
```"
else
value=""
fi
echo "value=${formatted_diff}" >> $GITHUB_OUTPUT
```
- name: 🚀 Create release
id: release
uses: softprops/action-gh-release@v2.2.0
uses: softprops/action-gh-release@v2.1.0
with:
name: ${{ needs.info.outputs.project_version }}
tag_name: ${{ needs.info.outputs.project_version }}
body: |
${{ needs.info.outputs.changelog }}
${{ steps.format_diff.outputs.value }}
${{ steps.format_diff.outputs.text }}
files: |
${{ needs.info.outputs.project_full_name }}-curseforge.zip
${{ needs.info.outputs.project_full_name }}-serverpack.zip
Expand Down

0 comments on commit a29a19e

Please sign in to comment.