2024-03-12 22:01:18 +08:00
|
|
|
name: Release to Linux repository
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-10-08 02:49:40 +08:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
|
2024-03-12 22:01:18 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
2024-08-20 21:33:31 +08:00
|
|
|
go-version: ^1.23
|
2024-04-10 19:43:29 +08:00
|
|
|
- name: Extract signing key
|
|
|
|
run: |-
|
|
|
|
mkdir -p $HOME/.gnupg
|
|
|
|
cat > $HOME/.gnupg/sagernet.key <<EOF
|
|
|
|
${{ secrets.GPG_KEY }}
|
2024-04-28 13:22:14 +08:00
|
|
|
echo "HOME=$HOME" >> "$GITHUB_ENV"
|
2024-04-10 19:43:29 +08:00
|
|
|
EOF
|
2024-04-26 20:24:36 +08:00
|
|
|
echo "HOME=$HOME" >> "$GITHUB_ENV"
|
2024-03-12 22:01:18 +08:00
|
|
|
- name: Publish release
|
2024-06-05 11:24:31 +08:00
|
|
|
uses: goreleaser/goreleaser-action@v6
|
2024-03-12 22:01:18 +08:00
|
|
|
with:
|
|
|
|
distribution: goreleaser-pro
|
|
|
|
version: latest
|
2024-03-16 12:17:55 +08:00
|
|
|
args: release -f .goreleaser.fury.yaml --clean
|
2024-03-12 22:01:18 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
2024-03-16 12:17:55 +08:00
|
|
|
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
2024-04-26 20:24:36 +08:00
|
|
|
NFPM_KEY_PATH: ${{ env.HOME }}/.gnupg/sagernet.key
|
2024-04-10 19:43:29 +08:00
|
|
|
NFPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|