Skip to content

github actions

github actions #1

name: xtractl-snapshot
on: [push]
jobs:
bin:
runs-on: ubuntu-latest
steps:
- name: clone
uses: actions/checkout@v4
- name: build
uses: docker://ghcr.io/ldproxy/golang-jdk:1.2
working-directory: ./xtractl
env:
CI_COMMIT_BRANCH: ${{ github.ref_name }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_COMMIT_TAG: ${{ github.ref_type == 'tag' && github.ref_name || '' }}
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/xtractl -ldflags="-s -w -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitTag=${CI_COMMIT_TAG} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitSha=${CI_COMMIT_SHA} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitBranch=${CI_COMMIT_BRANCH}"
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o dist/linux-arm64/xtractl -ldflags="-s -w -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitTag=${CI_COMMIT_TAG} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitSha=${CI_COMMIT_SHA} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitBranch=${CI_COMMIT_BRANCH}"