Skip to content

Add RPM/APT publish

Add RPM/APT publish #8

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Get Go version from .tool-versions
run: echo "GO_VERSION=$(cat .tool-versions | grep -oP 'golang \K((\w+.)+\w+)')" >> $GITHUB_ENV
- 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:

Check failure on line 28 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
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
with:
distribution: goreleaser
version: '${{ env.GORELEASER_VERSION }}'
args: release --clean
env:
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 }}