Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,20 @@ jobs:
with:
go-version-file: ./go.mod
- name: build
if: ${{ matrix.os != 'windows-latest' }}
run: |
echo "BINARY_NAME=$(cut -d "-" -f 1 <<< "${{ matrix.os }}")" >> $GITHUB_ENV
go build -o ntp-cli-${BINARY_NAME}-v${{ env.VERSION }}
PLATFORM=$(cut -d "-" -f 1 <<< "${{ matrix.os }}")
echo "PLATFORM=${PLATFORM}" >> $GITHUB_ENV
go build -o ntp-cli-${PLATFORM}-v${{ env.VERSION }}-preview
ls
- name: build for windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "PLATFORM=windows" >> $env:GITHUB_ENV
go build -o ntp-cli-windows-v${{ env.VERSION }}-preview
- name: upload the artifact
uses: actions/upload-artifact@v4
with:
name: ntp-cli ${{ env.VERSION }} for ${{ matrix.os }}
path: ./ntp-cli-${{ env.BINARY_NAME }}-v${{ env.VERSION }}
name: ntp-cli v${{ env.VERSION }} preview for ${{ env.PLATFORM }}
path: ./ntp-cli-${{ env.PLATFORM }}-v${{ env.VERSION }}-preview
overwrite: true
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,22 @@ jobs:
with:
go-version-file: ./go.mod
- name: build
if: ${{ matrix.os != 'windows-latest' }}
run: |
echo "BINARY_NAME=$(cut -d "-" -f 1 <<< "${{ matrix.os }}")" >> $GITHUB_ENV
go build -o ntp-cli-${BINARY_NAME}-v${{ env.VERSION }}
PLATFORM=$(cut -d "-" -f 1 <<< "${{ matrix.os }}")
echo "PLATFORM=${PLATFORM}" >> $GITHUB_ENV
go build -o ntp-cli-${PLATFORM}-v${{ env.VERSION }}
ls
- name: build for windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "PLATFORM=windows" >> $env:GITHUB_ENV
go build -o ntp-cli-windows-v${{ env.VERSION }}
- name: upload the artifact
uses: actions/upload-artifact@v4
with:
name: ntp-cli ${{ env.VERSION }} for ${{ matrix.os }}
path: ./ntp-cli-${{ env.BINARY_NAME }}-v${{ env.VERSION }}
name: ntp-cli v${{ env.VERSION }} for ${{ env.PLATFORM }}
path: ./ntp-cli-${{ env.PLATFORM }}-v${{ env.VERSION }}
overwrite: true

release:
Expand Down