Skip to content

Commit

Permalink
chore: add GH workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mcharytoniuk committed May 10, 2024
1 parent 34bdece commit fdb872f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build

on:
workflow_call:
workflow_dispatch:
push:
branches:
- "**"

jobs:
build:
name: build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Build
run: |
go build -o structured-bin-linux-x64 ./...
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: release

on:
push:
tags:
- 'v*'

jobs:
release:
name: create release
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Build
run: |
go build -o structured-bin-linux-x64 ./...
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: structured-bin-linux-x64

0 comments on commit fdb872f

Please sign in to comment.