Skip to content

Commit

Permalink
feat: Add github action for automated release
Browse files Browse the repository at this point in the history
Release is triggered by pushing a new tag.
  • Loading branch information
milonoir committed Oct 12, 2023
1 parent 178439a commit 4ac0c91
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- '*'

defaults:
run:
shell: bash

jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Setup Mage
uses: magefile/mage-action@v3
with:
install-only: true
- name: Build binaries with Mage
run: |
mage v-all ${GITHUB_REF#refs/tags/}
mage v-win ${GITHUB_REF#refs/tags/}
mage v-mac ${GITHUB_REF#refs/tags/}
- name: Release Notes
run: |
git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s%n * %an <%ae>' --no-merges >> ".github/RELEASE-TEMPLATE.md"
- name: Release with Notes
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
bin/*
body_path: ".github/RELEASE-TEMPLATE.md"
tag_name: ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit 4ac0c91

Please sign in to comment.