Skip to content

Commit

Permalink
update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoisaiah committed Feb 22, 2023
1 parent 034d41d commit d48f264
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- "v*"
- 'v*'

jobs:
build:
Expand All @@ -13,35 +13,32 @@ jobs:

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go 1.17
uses: actions/setup-go@v2
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.20
id: go

- name: Create GitHub Release
uses: actions/create-release@v1
uses: elgohr/Github-Release-Action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ env.CHANGELOG }}
draft: false
prerelease: false
title: ${{ github.ref }}

- name: Install libasound2-dev
run: sudo apt install libasound2-dev
if: matrix.os == 'ubuntu-latest'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCOOP_BUCKET_GITHUB_TOKEN: ${{ secrets.SCOOP_BUCKET_GITHUB_TOKEN }}
34 changes: 19 additions & 15 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@ builds:
goarch: arm64
main: ./cmd/focus
archives:
-
replacements:
darwin: darwin
linux: linux
windows: windows
amd64: amd64
arm64: arm64

files:
- files:
- LICENCE
- README.md
- CHANGELOG.md
Expand All @@ -40,20 +32,23 @@ changelog:
- '^docs:'
- '^test:'
nfpms:
-
id: focus
- id: focus
package_name: focus
file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
file_name_template:
'{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
vendor: Freshman
homepage: https://freshman.tech
maintainer: Ayooluwa Isaiah <[email protected]>
description: Focus is a command-line productivity timer based on the Pomodoro Technique
description:
Focus is a command-line productivity timer based on the Pomodoro Technique
license: MIT
formats:
- deb
- rpm
scoop:
url_template: 'https://github.com/ayoisaiah/focus/releases/download/{{ .Tag }}/{{ .ArtifactName }}'
url_template:
'https://github.com/ayoisaiah/focus/releases/download/{{ .Tag }}/{{
.ArtifactName }}'
bucket:
owner: ayoisaiah
name: scoop-bucket
Expand All @@ -63,5 +58,14 @@ scoop:
email: [email protected]
commit_msg_template: 'Scoop update for {{ .ProjectName }} version {{ .Tag }}'
homepage: 'https://github.com/ayoisaiah/focus'
description: 'Focus is a command-line productivity timer based on the Pomodoro Technique'
description:
'Focus is a command-line productivity timer based on the Pomodoro Technique'
license: MIT

brews:
- install: |-
bin.install "focus"
homepage: 'https://github.com/ayoisaiah/focus'
license: 'MIT'

0 comments on commit d48f264

Please sign in to comment.