Skip to content

Commit a83815c

Browse files
committed
fix(ci): Use tar instead of zip in Git bash
1 parent 4d5580e commit a83815c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/publish-release.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ jobs:
107107
- name: Build release version
108108
run: cargo build -v --release --features static
109109
- name: Compress binary
110-
run: cd target/release && zip -9 needle-$GITHUB_REF_NAME-windows-amd64.zip needle
110+
# Smart way to avoid installing "zip" in Git bash
111+
# -a: auto-compress
112+
# Reference: https://stackoverflow.com/a/71023414/845275
113+
run: cd target/release && tar -a -c -f needle-$GITHUB_REF_NAME-windows-amd64.zip needle
111114
shell: bash
112115
- name: Upload binary to the release
113116
uses: softprops/action-gh-release@v1

.github/workflows/release-please.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ on:
77
jobs:
88
release-please:
99
runs-on: ubuntu-latest
10-
env:
11-
# Use a personal access token to trigger the "publish-release" workflow
12-
# when a new tag is created.
13-
# See: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
14-
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
1510
steps:
1611
- uses: google-github-actions/release-please-action@v3
12+
env:
13+
# Use a personal access token to trigger the "publish-release" workflow
14+
# when a new tag is created.
15+
# See: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
16+
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
1717
with:
1818
release-type: rust

0 commit comments

Comments
 (0)