Skip to content

Commit 46b4f68

Browse files
committed
fix publish workflow
1 parent b9b3cbc commit 46b4f68

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ jobs:
2222
- name: Check if changelog.txt changed
2323
id: changed-files
2424
run: |
25-
git fetch origin
26-
if git diff --name-only origin/main...HEAD | grep -q "^changelog\.txt$"; then
25+
# Get the commit SHA that triggered the workflow
26+
COMMIT_SHA="$GITHUB_SHA"
27+
# Get the parent commit SHA
28+
PARENT_SHA=$(git rev-parse "$COMMIT_SHA^")
29+
# Check if changelog.txt was modified in this commit
30+
if git diff --name-only "$PARENT_SHA" "$COMMIT_SHA" | grep -q "^changelog\.txt$"; then
2731
echo "any_modified=true" >> "$GITHUB_OUTPUT"
2832
else
2933
echo "any_modified=false" >> "$GITHUB_OUTPUT"

changelog.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Version: 2.0.11
33
Date: 2025-04-19
44
Locale:
5-
- Added English locale for primary industry recipes. Required for Factorio 2.0.
5+
- Added English locale for primary industry recipes.
66
Bugfixes:
77
- Fixed an issue where the mod would crash when you open a train station or treasury that was built outside the city's range.
88
---------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)