-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0f6a6c
commit 3b7cab0
Showing
5 changed files
with
175 additions
and
2 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 |
---|---|---|
|
@@ -20,4 +20,4 @@ jobs: | |
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: 'v1.55' | ||
version: 'v1.54' |
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,55 @@ | ||
name: build-and-release | ||
on: | ||
push: | ||
branches: | ||
- unstable | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- name: Install RPM tooling | ||
run: sudo apt-get install -y rpm | ||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} | ||
- name: "Setup Ruby for packagecloud uploads" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: "Install packagecloud gem" | ||
run: gem install package_cloud | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '>=1.20.5' | ||
cache: true | ||
- name: "Create GPG_SIGNING_KEY file" | ||
run: "echo '${{ secrets.GPG_SIGNING_KEY }}' > /tmp/key.gpg" | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Use a fine grained PAT with Contents: R/W on golift/homebrew-mugs. | ||
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | ||
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | ||
GPG_SIGNING_KEY: /tmp/key.gpg | ||
GPG_SIGNING_KEY_ID: ${{ steps.import_gpg.outputs.keyid }} |
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 @@ | ||
/xt | ||
/xt.* | ||
/dist/ |
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,115 @@ | ||
version: 1 | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
# you may remove this if you don't need go generate | ||
- go generate ./... | ||
|
||
builds: | ||
# notice that we need a separated build for the MacOS binary only: | ||
- env: | ||
- CGO_ENABLED=0 | ||
- CGO_LDFLAGS=-mmacosx-version-min=10.8 | ||
- CGO_CFLAGS=-mmacosx-version-min=10.8 | ||
id: macos | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -s -w | ||
- -X "golift.io/version.Version={{.Version}}" | ||
- -X "golift.io/version.BuildDate={{.Date}}" | ||
- -X "golift.io/version.BuildUser={{.Env.USER}}" | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- freebsd | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- '386' | ||
ldflags: | ||
- -s -w | ||
- -X "golift.io/version.Version={{.Version}}" | ||
- -X "golift.io/version.BuildDate={{.Date}}" | ||
- -X "golift.io/version.BuildUser={{.Env.USER}}" | ||
ignore: | ||
- goos: windows | ||
goarch: arm | ||
|
||
|
||
archives: | ||
- format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
nfpms: | ||
- id: xt-packages | ||
vendor: Go Lift | ||
homepage: https://unpackerr.com | ||
maintainer: David Newhall II <captain at golift dot io> | ||
description: eXtractor Tool - Recursively decompress archives | ||
license: MIT | ||
formats: | ||
- deb | ||
- rpm | ||
- archlinux | ||
- apk | ||
bindir: /usr/bin | ||
version_metadata: git | ||
section: default | ||
priority: extra | ||
provides: | ||
- xt | ||
# signing | ||
rpm: | ||
signature: | ||
key_file: "{{ .Env.GPG_SIGNING_KEY }}" | ||
deb: | ||
signature: | ||
key_file: "{{ .Env.GPG_SIGNING_KEY }}" | ||
type: origin | ||
|
||
universal_binaries: | ||
- replace: true | ||
|
||
signs: | ||
- id: default | ||
artifacts: all | ||
|
||
brews: | ||
- name: xt | ||
# enable the line below only for testing locally | ||
#skip_upload: true | ||
repository: | ||
owner: golift | ||
name: homebrew-mugs | ||
branch: master | ||
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" | ||
commit_author: | ||
name: goreleaserbot | ||
email: [email protected] | ||
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" | ||
folder: Formula | ||
homepage: https://unpackerr.com/ | ||
description: "eXtractor Tool - Recursively decompress archives" | ||
license: MIT | ||
url_template: "https://github.com/Unpackerr/xt/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||
test: assert_match "xt v#{version}", shell_output("#{bin}/xt -v 2>&1", 2) | ||
install: bin.install "xt" | ||
|
||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
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,4 +1,4 @@ | ||
# xt | ||
# eXtractor Tool | ||
|
||
Extract Everything. Decompress entire folders filled with archives. | ||
|
||
|