Skip to content

Commit

Permalink
Add RPM/APT publish
Browse files Browse the repository at this point in the history
  • Loading branch information
inverse committed May 22, 2023
1 parent 95823c8 commit 31501b8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '${{ env.GO_VERSION }}'
- name: Get nfpm version from .tool-versions
run: echo "NFPM_VERSION=$(cat .tool-versions | grep -oP 'nfpm \K((\w+.)+\w+)')" >> $GITHUB_ENV
- name: Setup nfpm
uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/goreleaser/nfpm/releases/download/v${{ env.NFPM_VERSION }}/nfpm_${{ env.NFPM_VERSION }}_Linux_x86_64.tar.gz'
name: 'nfpm'
version: ${{ env.NFPM_VERSION }}'
- name: Setup fury
uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/gemfury/cli/releases/download/v0.20.1/fury_0.20.1_Linux_64bit.tar.gz'
name: 'fury'
version: '0.20.1'
- name: Get goreleaser version from .tool-versions
run: echo "GORELEASER_VERSION=$(cat .tool-versions | grep -oP 'goreleaser \K((\w+.)+\w+)')" >> $GITHUB_ENV
- uses: goreleaser/goreleaser-action@v4
Expand All @@ -32,3 +46,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
PROJECT: github.com/inverse/git-pair
AUR_KEY: ${{ secrets.AUR_KEY }}
- name: Upload rpm and apt binaries
run: ./scripts/deploy.sh
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
15 changes: 15 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,23 @@ brews:
folder: Formula
description: 'A simple CLI app to make it easier for pairing for co-authoring commits'
homepage: 'https://github.com/inverse/git-pair/'
license: MIT
test: |
system "#{bin}/git-pair --version"
nfpms:
- package_name: git-pair
vendor: inverse
homepage: 'https://github.com/inverse/git-pair/'
maintainer: 'Malachi Soord <me@malachisoord.com>'
description: 'A simple CLI app to make it easier for pairing for co-authoring commits'
license: MIT
formats:
- deb
- rpm
provides:
- git-pair
recommends:
- git
release:
draft: false
name_template: 'v{{.Version}}'
Expand Down
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
golang 1.20.4
golangci-lint 1.52.2
goreleaser 1.18.2
task 3.24.0
nfpm 2.28.0
task 3.24.0
7 changes: 7 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

cd dist

for file in *.rpm *.deb; do
fury push $file --api-token=$FURY_TOKEN
done

0 comments on commit 31501b8

Please sign in to comment.