This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
change: client.gpt #18
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: Test & Release | |
on: | |
- push | |
- workflow_dispatch | |
env: | |
GO_VERSION: "1.22.x" | |
jobs: | |
test-suite: | |
timeout-minutes: 30 | |
name: Full Test Suite | |
runs-on: ubuntu-22.04 | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
- name: Setup Go environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "${{ env.GO_VERSION }}" | |
- name: Setup CI Tools | |
run: make ci-setup | |
# Tests | |
- name: Run Go Tests | |
run: make test | |
# Builds | |
- name: Test Platform Builds | |
run: make build-cross | |
release-github: | |
name: Build & Release Binaries | |
# Only run on tags | |
runs-on: ubuntu-22.04 | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
- name: Setup Go environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "${{ env.GO_VERSION }}" | |
- name: Setup CI Tools | |
run: make ci-setup | |
# Go Build | |
- name: Build k3d Binary | |
run: make gen-checksum build-cross | |
# Create Git Release | |
- name: Extract Tag from Ref | |
if: startsWith(github.ref, 'refs/tags/') | |
id: tag | |
run: echo VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT | |
shell: bash | |
- uses: apexskier/github-semver-parse@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
id: semver | |
with: | |
version: ${{ steps.tag.outputs.VERSION }} | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
artifacts: dist/* | |
# discussionCategory: releases | |
makeLatest: ${{ steps.semver.outputs.prerelease == '' }} | |
generateReleaseNotes: true | |
prerelease: ${{ steps.semver.outputs.prerelease != '' }} | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} |