Skip to content

Commit

Permalink
adjust release to build action
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdy committed Oct 3, 2023
1 parent 5ab629c commit c73ec86
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ jobs:
with:
go-version: '1.21'

- name: Build
run: |
go get .
if [ "$RUNNER_OS" == "Linux" ]; then
go build -v -o dhtc-linux dhtc
elif [ "$RUNNER_OS" == "Windows" ]; then
go build -v -o dhtc-windows.exe dhtc
elif [ "$RUNNER_OS" == "macOS"]; then
go build -v -o dhtc-macos dhtc
else
echo "$RUNNER_OS is unsupported"
exit 1
fi
- name: Go get
run: go get .

- name: Build Linux
if: runner.os == 'Linux'
run: go build -v -o dhtc-linux dhtc

- name: Build macOS
if: runner.os == 'macOS'
run: go build -v -o dhtc-macos dhtc

- name: Build Windows
if: runner.os == 'Windows'
run: go build -v -o dhtc-windows.exe dhtc

- name: Release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit c73ec86

Please sign in to comment.