Skip to content

Create github action to create a release based on tag #16

Create github action to create a release based on tag

Create github action to create a release based on tag #16

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v-test*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [arm64, amd64]
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21.6'
- name: Check out code
uses: actions/checkout@v4
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }}
path: ./vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }}
release:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [arm64, amd64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate SHA256 Checksum
run: sha256sum ./vault-kv-search-*/vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }} >> sha256sums.txt
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: false
files: |
./sha256sums.txt
./vault-kv-search-*/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}