Skip to content

Fix CI variable

Fix CI variable #64

Workflow file for this run

name: Test
on:
push:
branches:
- '**'
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure all history and tags are fetched
- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version: "1.22.4"
- name: Get latest Git tag
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Build
run: |
mkdir dist
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w -X 'github.com/rjuer/cidr/cmd.version=$VERSION'" -o dist/
- name: Test
run: |
mkdir tmp
make vet
make test