Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 83047f7

Browse files
committedSep 8, 2024·
Update build.yml
1 parent 2859e0b commit 83047f7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed
 

‎.github/workflows/build.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ jobs:
2424
go build -o spammer.dll -buildmode=c-shared main.go
2525
mv spammer.dll ../shared/spammer.dll
2626
27-
- name: Commit and push changes
27+
- name: Check for changes and commit
2828
run: |
2929
git config --global user.email "your-email@example.com"
3030
git config --global user.name "GitHub Actions"
31-
git add shared/spammer.dll
32-
git commit -m "Add built spammer.dll for Windows"
33-
git push
31+
git diff --exit-code || (git add shared/spammer.dll && git commit -m "Add built spammer.dll for Windows" && git push)
3432
env:
3533
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3634

@@ -56,12 +54,10 @@ jobs:
5654
go build -o spammer.so -buildmode=c-shared main.go
5755
mv spammer.so ../shared/spammer.so
5856
59-
- name: Commit and push changes
57+
- name: Check for changes and commit
6058
run: |
6159
git config --global user.email "your-email@example.com"
6260
git config --global user.name "GitHub Actions"
63-
git add shared/spammer.so
64-
git commit -m "Add built spammer.so for Linux"
65-
git push
61+
git diff --exit-code || (git add shared/spammer.so && git commit -m "Add built spammer.so for Linux" && git push)
6662
env:
6763
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
This repository has been archived.