Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikaro committed Dec 21, 2024
1 parent 9935410 commit fca747d
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,23 @@ jobs:
echo "✔️ pakku.json"
fi
- name: 📈 Latest & Previous Tag
id: tag
uses: JinoArch/get-latest-tag@latest
- name: 📈 Get latest tag
id: latest_tag
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
if [ -z "$tag" ]; then
echo "❌ Latest tag not found" && exit 1
else
echo "✔️ Latest tag found: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
fi
- name: 🔍 Check pakku-lock.json in previous tag
id: check_pakku_lock_prev
shell: bash
run: |
if ! git ls-tree -r ${{ steps.tag.outputs.latestTag }} -- ./pakku-lock.json &> /dev/null; then
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"
else
echo "✔️ File pakku-lock.json found in previous tag"
Expand All @@ -74,7 +82,7 @@ jobs:
id: check_copy_lock
shell: bash
run: |
git show tags/${{ steps.tag.outputs.latestTag }}:./pakku-lock.json > ./pakku-lock-prev.json
git show tags/${{ steps.latest_tag.outputs.tag }}:./pakku-lock.json > ./pakku-lock-prev.json
if [ -s ./pakku-lock-prev.json ]; then
echo "✔️ File pakku-lock-prev.json created"
else
Expand Down Expand Up @@ -166,14 +174,14 @@ jobs:
uses: WcAServices/[email protected]
with:
template: |
echo "📃 **Name**: ${{ steps.project_name.outputs.value }}"
echo "📃 **Release**: ${{ steps.project_version.outputs.value }}"
echo "📃 **Release Type**: ${{ env.RELEASE_TYPE }}"
echo "📃 **Game Version**: ${{ env.MINECRAFT_VERSION }}"
📃 **Name**: ${{ steps.project_name.outputs.value }}
📃 **Release**: ${{ steps.project_version.outputs.value }}
📃 **Release Type**: ${{ env.RELEASE_TYPE }}
📃 **Game Version**: ${{ env.MINECRAFT_VERSION }}
echo "${{ steps.changelog.outputs.description }}"
${{ steps.changelog.outputs.description }}
if [ -n "${{ steps.read_diff.outputs.diff != '' }}" ]; then
echo "${{ steps.read_diff.outputs.diff }}"
${{ steps.read_diff.outputs.diff }}
fi

Expand Down

0 comments on commit fca747d

Please sign in to comment.