Skip to content

Release

Release #4

Workflow file for this run

name: Release
# Controls when the workflow will run
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.17.1
- name: Cache go module
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
env:
NAME: oci-help
BINDIR: build
run: |
make release -j$(nproc)
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
with:
files: build/*.zip