mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-07-27 17:22:59 +00:00
77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
name: Release
|
|
|
|
concurrency:
|
|
group: kubeshark-publish-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
release:
|
|
name: Build and publish a new release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.17
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.17'
|
|
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Version
|
|
id: version
|
|
shell: bash
|
|
run: |
|
|
echo ::set-output name=tag::${GITHUB_REF#refs/*/}
|
|
echo "##[set-output name=build_timestamp;]$(echo $(date +%s))"
|
|
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
|
|
- name: Build
|
|
run: make build-all
|
|
|
|
- name: Log the version into a .txt file
|
|
shell: bash
|
|
run: |
|
|
echo '${{ steps.versioning.outputs.version }}' >> bin/version.txt
|
|
|
|
- name: Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
artifacts: "bin/*"
|
|
commit: ${{ steps.version.outputs.branch }}
|
|
tag: ${{ steps.version.outputs.tag }}
|
|
prerelease: ${{ github.ref != 'refs/heads/master' }}
|
|
bodyFile: 'bin/README.md'
|
|
|
|
brew-tap:
|
|
name: Create Homebrew formulae
|
|
runs-on: ubuntu-latest
|
|
needs: [release]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Fetch all tags
|
|
run: git fetch --force --tags
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
distribution: goreleaser
|
|
version: ${{ env.GITHUB_REF_NAME }}
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|