-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build releases using goreleaser
- Loading branch information
1 parent
2258a91
commit de33658
Showing
11 changed files
with
162 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
set -eux | ||
cargo build --release | ||
cp -a target/release/notmuch-mailmover dist/notmuch-mailmover_linux_amd64_v1/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
- "v*" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
create-release: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v5 # for dummy.go | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Install build deps | ||
run: sudo apt-get update -q && sudo apt-get install -y libnotmuch-dev | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
changelog: CHANGELOG.md | ||
branch: "main|v[0-9]+" | ||
draft: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
distribution: goreleaser | ||
version: 'latest' | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/target | ||
/result | ||
/dist | ||
/share |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
version: 2 | ||
|
||
project_name: notmuch-mailmover | ||
|
||
builds: | ||
- id: notmuch-mailmover | ||
main: dummy.go | ||
goarch: | ||
- amd64 | ||
goos: | ||
- linux | ||
binary: notmuch-mailmover | ||
hooks: | ||
post: sh .ci/build.sh | ||
|
||
archives: | ||
- id: notmuch-mailmover | ||
builds: | ||
- notmuch-mailmover | ||
name_template: >- | ||
{{ .ProjectName }}_{{ .Version }}_ | ||
{{- if eq .Os "darwin" }}macOS | ||
{{- else if eq .Os "linux" }}Linux | ||
{{- else }}{{ .Os }}{{ end }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
format: tar.zst | ||
files: | ||
- LICENSE | ||
- share | ||
|
||
nfpms: | ||
- id: notmuch-mailmover | ||
package_name: notmuch-mailmover | ||
builds: | ||
- notmuch-mailmover | ||
formats: | ||
- deb | ||
- rpm | ||
- archlinux | ||
maintainer: Michael Adler <[email protected]> | ||
homepage: https://github.com/michaeladler/notmuch-mailmover | ||
description: move notmuch tagged mails into Maildir folders | ||
dependencies: | ||
- notmuch | ||
section: mail | ||
priority: extra | ||
contents: | ||
# zsh completion | ||
- src: share/_notmuch-mailmover | ||
dst: /usr/share/zsh/vendor-completions/_notmuch-mailmover | ||
|
||
# bash completion | ||
- src: share/notmuch-mailmover.bash | ||
dst: /usr/share/bash-completion/completions/notmuch-mailmover | ||
|
||
# fish completion | ||
- src: share/notmuch-mailmover.fish | ||
dst: /usr/share/fish/completions/notmuch-mailmover.fish | ||
|
||
# man page | ||
- src: share/notmuch-mailmover.1.gz | ||
dst: /usr/share/man/man1/notmuch-mailmover.1.gz | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
release: | ||
draft: true | ||
replace_existing_draft: true | ||
|
||
changelog: | ||
sort: asc | ||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: "Bug fixes" | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package main | ||
|
||
func main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters