Skip to content

Commit cf93c9e

Browse files
committed
feat: build results are added into github packages
- Build results uploaded under packages, the reason for that is during development we might want to test intermediate builds in some systems(usually in some other systems which consumes storage-cli and uses)and see that our new developed feature worked out. When developments are done we can create PR and once PR goes into main new release will be created.
1 parent 0ad0d3a commit cf93c9e

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build
22
on:
33
push:
4-
branches: [ main ]
4+
branches: [ '**' ] # Trigger on all branches
55
pull_request:
66
branches: [ main ]
77

@@ -24,7 +24,8 @@ jobs:
2424
CGO_ENABLED: 0
2525
run: |
2626
echo "Building Storage CLI for Linux"
27-
go build -o "storage-cli-linux-amd64"
27+
go build -ldflags "-X main.version=0.0.0" \
28+
-o "storage-cli-linux-amd64"
2829
sha1sum "storage-cli-linux-amd64"
2930
3031
- name: Storage-CLI Build for Windows
@@ -34,5 +35,15 @@ jobs:
3435
CGO_ENABLED: 0
3536
run: |
3637
echo "Building Storage CLI for Windows"
37-
go build -o "storage-cli-windows-amd64.exe"
38-
sha1sum "storage-cli-windows-amd64.exe"
38+
go build -ldflags "-X main.version=0.0.0" \
39+
-o "storage-cli-windows-amd64.exe"
40+
sha1sum "storage-cli-windows-amd64.exe"
41+
42+
- name: Upload Build Artifacts
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: storage-cli-${{ github.ref_name }}-${{ github.sha }}
46+
path: |
47+
storage-cli-linux-amd64
48+
storage-cli-windows-amd64.exe
49+
retention-days: 30

0 commit comments

Comments
 (0)