Skip to content

Build

Build #6

Workflow file for this run

name: Build
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21"]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Build ARM64
run: GOOS=linux GOARCH=arm64 go build -o vitoagent_arm64 ./cmd/agent.go
- name: Build AMD64
run: GOOS=linux GOARCH=amd64 go build -o vitoagent_amd64 ./cmd/agent.go
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vitoagent_arm64
asset_name: vitoagent_arm64
asset_content_type: application/octet-stream
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vitoagent_amd64
asset_name: vitoagent_amd64
asset_content_type: application/octet-stream