Skip to content

Commit

Permalink
Add actions for automatic releases (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhbert authored Sep 3, 2024
1 parent 7a2c01e commit 3684324
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release latest tag

on:
create:
tags:
- v*
pull_request:
branches:
- "main"

permissions:
contents: write

jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # To use `git describe --tags`

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Setup Task
uses: arduino/setup-task@v2

- name: Build and package
run: task build-all

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
result/*.tar.gz
3 changes: 2 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version: '3'

vars:
VERSION: "v0.2.0"
VERSION:
sh: git describe --tags | sed -r 's/-.+//'

tasks:
prepare:
Expand Down

0 comments on commit 3684324

Please sign in to comment.