Skip to content

Merge pull request #83 from openshift-kni/drop-k8s-k-dep #15

Merge pull request #83 from openshift-kni/drop-k8s-k-dep

Merge pull request #83 from openshift-kni/drop-k8s-k-dep #15

Workflow file for this run

name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
defaults:
run:
shell: bash
jobs:
release-build:
runs-on: ubuntu-20.04
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup golang
uses: actions/setup-go@v2
id: go
with:
go-version: 1.20.5
- name: verify modules
run: go mod verify
- name: set release version env var
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: build tools
run: |
make
- name: fix build artifacts
run: |
for tool in knit cpulist numalign; do
mv _output/$tool $tool-${{ env.RELEASE_VERSION }}-linux-amd64
done
make clean outdir
for tool in knit cpulist numalign; do
mv $tool-${{ env.RELEASE_VERSION}}-linux-amd64 _output/
done
- name: compute signature
run: |
pushd _output && sha256sum * >> ../SHA256SUMS && mv ../SHA256SUMS . && popd
- name: upload build artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: _output/*
release:
needs: [release-build]
runs-on: ubuntu-20.04
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
# todo: create changelog and/or release body
- name: download again the build artifacts
uses: actions/download-artifact@v2
with:
name: build-artifacts
- name: create release
uses: ncipollo/release-action@v1
with:
artifacts: "SHA256SUMS,*-v*-linux-amd64"
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token