fix: negotiate Docker API version (#932) #146
Workflow file for this run
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: release | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: {} | |
jobs: | |
artifacts: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: linux | |
arch: amd64 | |
- os: linux | |
arch: arm64 | |
- os: darwin | |
arch: amd64 | |
- os: darwin | |
arch: arm64 | |
steps: | |
# -------------------------------------------------------------------------- | |
# Repository Checkout | |
# -------------------------------------------------------------------------- | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setup golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
# -------------------------------------------------------------------------- | |
# Build & Upload Artifacts | |
# -------------------------------------------------------------------------- | |
- name: build for ${{ matrix.os }} ${{ matrix.arch }} | |
run: make build GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} | |
- name: upload ${{ matrix.os }} ${{ matrix.arch }} artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bin | |
path: build/ktf.${{ matrix.os }}.${{ matrix.arch }} | |
if-no-files-found: error | |
# -------------------------------------------------------------------------- | |
# Generate Checksums | |
# -------------------------------------------------------------------------- | |
- name: generate checksum for ${{ matrix.os }} ${{ matrix.arch }} artifact | |
run: sha256sum ktf.${{ matrix.os }}.${{ matrix.arch }} >> CHECKSUMS.${{ matrix.os }}.${{ matrix.arch }} | |
working-directory: ./build/ | |
- name: upload checksum for ${{ matrix.os }} ${{ matrix.arch }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CHECKSUMS | |
path: build/CHECKSUMS.${{ matrix.os }}.${{ matrix.arch }} | |
if-no-files-found: error | |
# -------------------------------------------------------------------------- | |
# Release Job | |
# -------------------------------------------------------------------------- | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- artifacts | |
steps: | |
# -------------------------------------------------------------------------- | |
# Github Release | |
# -------------------------------------------------------------------------- | |
- name: download checksums artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: CHECKSUMS | |
- name: concatenate all checksums | |
run: cat CHECKSUMS.* > CHECKSUMS | |
- name: download binary artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: bin | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: false | |
prerelease: false | |
files: | | |
CHECKSUMS | |
ktf.* | |
body: | | |
See the [CHANGELOG.md](https://raw.githubusercontent.com/Kong/kubernetes-testing-framework/main/CHANGELOG.md) | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |