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

Commit 53df8f4

Browse files
committed
Github actions
1 parent 83047f7 commit 53df8f4

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/build.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ jobs:
2222
run: |
2323
cd go_spammer
2424
go build -o spammer.dll -buildmode=c-shared main.go
25-
mv spammer.dll ../shared/spammer.dll
25+
if (Test-Path ../shared/spammer.dll) { Remove-Item ../shared/spammer.dll }
26+
Move-Item spammer.dll ../shared/spammer.dll
27+
shell: pwsh
2628

27-
- name: Check for changes and commit
29+
- name: Configure Git
2830
run: |
29-
git config --global user.email "your-email@example.com"
31+
git config --global user.email "lmy615730@gmail.com"
3032
git config --global user.name "GitHub Actions"
33+
34+
- name: Check for changes and commit
35+
run: |
3136
git diff --exit-code || (git add shared/spammer.dll && git commit -m "Add built spammer.dll for Windows" && git push)
3237
env:
3338
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -52,12 +57,16 @@ jobs:
5257
run: |
5358
cd go_spammer
5459
go build -o spammer.so -buildmode=c-shared main.go
60+
if [ -f ../shared/spammer.so ]; then rm ../shared/spammer.so; fi
5561
mv spammer.so ../shared/spammer.so
5662
57-
- name: Check for changes and commit
63+
- name: Configure Git
5864
run: |
59-
git config --global user.email "your-email@example.com"
65+
git config --global user.email "lmy615730@gmail.com"
6066
git config --global user.name "GitHub Actions"
67+
68+
- name: Check for changes and commit
69+
run: |
6170
git diff --exit-code || (git add shared/spammer.so && git commit -m "Add built spammer.so for Linux" && git push)
6271
env:
6372
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)