Test workflow #1

This commit is contained in:
Tobias B 2021-11-16 15:57:42 +01:00
parent 8ae0e1fe57
commit 70a406e8b0
No known key found for this signature in database
GPG Key ID: 5EF4C92355A3B53D
3 changed files with 20 additions and 21 deletions

View File

@ -1,5 +1,7 @@
on: [push]
name: Upload binaries to release
on:
release:
types: [created]
name: Upload CLI binaries to release
jobs:
generate:
name: Create release-artifacts
@ -7,15 +9,19 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: LS
run: "ls -ahl"
# - name: Generate the artifacts
# uses: skx/github-action-build@master
# with:
# builder: .github/build
# - name: Upload the artifacts
# uses: skx/github-action-publish-binaries@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# args: 'aq-*'
- name: Build for windows/amd64
env:
GOOS: windows
GOARCH: amd64
run: go build CGO_ENABLED=0 -o aq-$GOOS-$GOARCH ./cmd/aqcli/
- name: Build for linux/amd64
env:
GOOS: linux
GOARCH: amd64
run: go build CGO_ENABLED=0 -o aq-$GOOS-$GOARCH ./cmd/aqcli/
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'aq-*'

View File

@ -1,5 +0,0 @@
#!/bin/bash
# Used by the Github release action, so that we can build and publish
# the CLI binary for multiple OSs.

View File

@ -11,8 +11,6 @@ import (
"time"
)
// TODO how can we add binaries to github releases? we need it for the cli
func main() {
err := godotenv.Load()
if err != nil {