Skip to content

chore : version 0.3.0 #3

chore : version 0.3.0

chore : version 0.3.0 #3

Workflow file for this run

name: Build and Test
permissions:
contents: write
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
matrix:
os: [ linux, windows, darwin ]
arch: [ amd64, arm64, 386 ]
exclude:
- os: windows
arch: arm64
- os: darwin
arch: 386
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
- name: Install dependencies
run: go get .
- run: |
mkdir aicli
cp README.md install.sh CHANGELOG.md aicli
- name: Build
run: |
name="aicli"
if [ "${{ matrix.os }}" = "windows" ]; then
name="${name}.exe"
fi
GOARCH=${{ matrix.arch }} GOOS=${{ matrix.os }} go build -o "aicli/${name}" .
- name: Archive
run: |
tar -czf \
aicli-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz aicli
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body_path: CHANGELOG.md
draft: false
prerelease: false
files: |
aicli-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz