Skip to content

Remove CircleCI and use Github Actions #1

Remove CircleCI and use Github Actions

Remove CircleCI and use Github Actions #1

Workflow file for this run

on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Build
run: |
mkdir -p ./coffee-beans
cp coffee-beans.yaml ./coffee-beans
go build -o ./coffee-beans/coffee-beans -ldflags "-X main.version=${GITHUB_REF#refs/*/}" "-X main.commit=${GITHUB_SHA}"
- name: Test
run: |
go test -v ./...
- name: Package
run: |
tar -czf coffee-beans.tar.gz ./coffee-beans
- name: Upload
if: github.ref == 'refs/heads/master' || github.ref == 'refs/tags/v*'
uses: actions/upload-artifact@v2
with:
name: coffee-beans
path: coffee-beans.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/tags/v*'
with:
files: coffee-beans.tar.gz