Skip to content

Commit

Permalink
build binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Feb 28, 2024
1 parent 07e9470 commit dff0579
Showing 1 changed file with 46 additions and 13 deletions.
59 changes: 46 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,59 @@
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
branch:
description: "Branch"
required: true
default: "main"
tag:
description: "Release Tag"



jobs:
binary:
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Build
run: |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build
-
name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: compose-spec
path: ./bin/*
if-no-files-found: error

release:
runs-on: ubuntu-latest
permissions:
contents: write # to create a release (ncipollo/release-action)
runs-on: ubuntu-latest
needs:
- binary
steps:
- name: Release it!
if: ${{ github.event.inputs.tag != '' }} # don't release if no tag is specified
-
name: Checkout
uses: actions/checkout@v3
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '2.21'
-
name: Download artifacts
uses: actions/download-artifact@v3
with:
name: compose
path: bin/release
-
name: GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
commit: ${{ github.event.inputs.branch }}

0 comments on commit dff0579

Please sign in to comment.