Skip to content

Release from main

Release from main #22

Workflow file for this run

name: Release from main
on:
workflow_dispatch:
inputs:
version:
description: 'Semver version to cut a release for (ie. 4.0.3)'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- run: |
GOOS=linux go build -ldflags "-X main.version=$VERSION" -o bin/log-cache-cf-plugin-linux
GOOS=darwin go build -ldflags "-X main.version=$VERSION" -o bin/log-cache-cf-plugin-darwin
GOOS=windows go build -ldflags "-X main.version=$VERSION" -o bin/log-cache-cf-plugin-windows
env:
VERSION: ${{ github.event.inputs.version }}
CGO_ENABLED: 0
- run: |
go_version=`go version | { read _ _ v _; echo ${v#go}; }`
gh release create -d -t "v$VERSION" --generate-notes "v$VERSION" --notes ":sparkles: built with go$go_version" ./bin/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.event.inputs.version }}