Skip to content

Commit 28f8053

Browse files
committed
Revert "remove unused stuff"
This reverts commit 7b12a8d.
1 parent 7b12a8d commit 28f8053

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release arduino-app-cli
22

33
on:
44
push:
@@ -34,6 +34,10 @@ jobs:
3434
with:
3535
fetch-depth: 0
3636

37+
- name: Configure Git for private repo cloning
38+
run: |
39+
git config --global url."https://${{ env.GITHUB_USERNAME }}:${{ env.GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
40+
3741
- name: Set up Go
3842
uses: actions/setup-go@v5
3943
with:
@@ -45,6 +49,18 @@ jobs:
4549
version: 3.x
4650
repo-token: ${{ secrets.GITHUB_TOKEN }}
4751

52+
- name: Build Binary
53+
env:
54+
GOARCH: ${{ matrix.arch }}
55+
run: |
56+
export CGO_ENABLED=0
57+
58+
mkdir -p build
59+
go build -v -ldflags "-s -w -X 'main.Version=${TAG_VERSION}'" -o ./build/${{ env.PROJECT_NAME }} ./cmd/arduino-app-cli
60+
chmod +x ./build/${{ env.PROJECT_NAME }}
61+
tar -czvf ./build/${{ env.PROJECT_NAME }}-${TAG_VERSION}-${{ matrix.platform-name }}-${{ matrix.arch }}.tar.gz -C ./build ${{ env.PROJECT_NAME }}
62+
rm ./build/${{ env.PROJECT_NAME }}
63+
4864
- name: Build deb
4965
if: matrix.platform-name == 'linux'
5066
run: |
@@ -56,5 +72,5 @@ jobs:
5672
token: ${{ secrets.GITHUB_TOKEN }}
5773
draft: false
5874
prerelease: true
59-
artifacts: build/*.deb
75+
artifacts: build/*.tar.gz,build/*.deb
6076
allowUpdates: true

0 commit comments

Comments
 (0)