Modo🧯 v0.11.1 #16
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: Release | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
build-linux: | |
name: Linux build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
shell: bash | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: | | |
go get ./... | |
- name: Build | |
run: | | |
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" . | |
chmod +x modo | |
- name: Compress binaries | |
run: | | |
tar -czf modo.tar.gz modo | |
shell: bash | |
- name: Upload binaries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: modo.tar.gz | |
asset_name: modo-${{ env.RELEASE_VERSION }}-linux-amd64.tar.gz | |
tag: ${{ github.ref }} | |
build-windows: | |
name: Windows build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
shell: bash | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: | | |
go get ./... | |
- name: Build | |
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" . | |
- name: Compress binaries | |
run: | | |
zip -r modo.zip modo.exe | |
shell: bash | |
- name: Upload binaries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: modo.zip | |
asset_name: modo-${{ env.RELEASE_VERSION }}-windows-amd64.zip | |
tag: ${{ github.ref }} | |
build-macos-arm64: | |
name: MacOS arm64 build | |
runs-on: macos-latest | |
steps: | |
- name: Get tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
shell: bash | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: | | |
go get ./... | |
- name: Build | |
run: | | |
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" . | |
chmod +x modo | |
- name: Compress binaries | |
run: | | |
zip -r modo.zip modo | |
shell: bash | |
- name: Upload binaries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: modo.zip | |
asset_name: modo-${{ env.RELEASE_VERSION }}-macos-arm64.zip | |
tag: ${{ github.ref }} | |
build-macos-amd64: | |
name: MacOS amd64 build | |
runs-on: macos-latest | |
steps: | |
- name: Get tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
shell: bash | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: | | |
go get ./... | |
- name: Build | |
run: | | |
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" . | |
chmod +x modo | |
- name: Compress binaries | |
run: | | |
zip -r modo.zip modo | |
shell: bash | |
- name: Upload binaries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: modo.zip | |
asset_name: modo-${{ env.RELEASE_VERSION }}-macos-amd64.zip | |
tag: ${{ github.ref }} |