Skip to content

Commit 5ab2ef7

Browse files
committed
Update BuildMultiplatform.yml
1 parent 9c81be0 commit 5ab2ef7

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/BuildMultiplatform.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@ jobs:
1616
outputs:
1717
projectname: ${{ steps.info.outputs.projectname }}
1818
projectsuffix: ${{ steps.info.outputs.projectsuffix }}
19-
tag: ${{ steps.version.outputs.tag }}
19+
tag: ${{ steps.info.outputs.tag }}
2020

2121
steps:
2222
- name: Checkout with fetch depth 2
2323
uses: actions/checkout@v4
2424
with:
25-
fetch-depth: 2
26-
27-
- name: Get tag
28-
id: version
29-
uses: "WyriHaximus/github-action-get-previous-tag@v1"
30-
with:
31-
fallback: tag_not_found
25+
fetch-depth: 0
3226

3327
- name: Get modpack info
3428
id: info
@@ -44,8 +38,11 @@ jobs:
4438
projectname=`echo $(jq -r '.name' <<< "$manifestjson")`
4539
echo "projectname=$projectname" >> $GITHUB_OUTPUT
4640
41+
latest_tag=$(git describe --tags --abbrev=0)
42+
echo "tag=$latest_tag" >> $GITHUB_OUTPUT
43+
4744
if [[ ${{ startsWith(github.ref, 'refs/tags/v') }} == true ]]; then
48-
echo "projectsuffix=${{ steps.version.outputs.tag }}" >> $GITHUB_OUTPUT
45+
echo "projectsuffix=$latest_tag" >> $GITHUB_OUTPUT
4946
else
5047
echo "projectsuffix=build.${{ github.run_number }}" >> $GITHUB_OUTPUT
5148
fi
@@ -55,7 +52,7 @@ jobs:
5552
latest_tag=$(git describe --tags --abbrev=0)
5653
latest_tagged_commit=$(git rev-list -n 1 --pretty=format:"%h" $latest_tag | sed -n 2p)
5754
58-
if [ "$latest_tag" = ${{ steps.version.outputs.tag }} ]; then
55+
if [ "$latest_tag" = ${{ steps.info.outputs.tag }} ]; then
5956
latest_tag=$(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)
6057
latest_tagged_commit=$(git rev-list -n 1 --pretty=format:"%h" $latest_tag | sed -n 2p)
6158
fi

0 commit comments

Comments
 (0)