Release 4.2.0 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Telepush on Linux | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build-and-release: | |
name: Build and add to Release | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ ubuntu-latest, macos-latest, windows-latest ] | |
include: | |
- platform: ubuntu-latest | |
alias: linux | |
- platform: macos-latest | |
alias: mac | |
- platform: windows-latest | |
alias: win | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.23 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Get dependencies | |
run: go get | |
- name: Prepare | |
run: | | |
mkdir -p dist/ | |
cp -R inlets.d dist/ | |
- name: Build | |
working-directory: ./dist | |
run: go build -v -ldflags '-w -s' -o telepush_${{ matrix.alias }}_amd64 ../ | |
- name: Compress working folder (Windows PowerShell) | |
working-directory: ./dist | |
if: "${{ matrix.alias == 'win' }}" | |
run: | | |
Compress-Archive -Path .\* -DestinationPath telepush_${{ matrix.alias }}_amd64.zip | |
- name: Compress working folder | |
working-directory: ./dist | |
if: "${{ matrix.alias != 'win' }}" | |
run: | | |
zip -9 -r telepush_${{ matrix.alias }}_amd64.zip ./* | |
- name: Upload built executable to release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./dist/*.zip |