-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.73 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (53 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: "1.26.1"
cache: true
- name: Install PAM headers
run: sudo apt-get update && sudo apt-get install -y libpam0g-dev
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run full test suite
run: go test ./...
- name: Run race detector
run: go test -race ./...
- name: Install syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b "$HOME/.local/bin"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Build release artifacts
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
- name: Configure SSH for APT publish
env:
PACKAGE_SERVER_SSH_KEY: ${{ secrets.PACKAGE_SERVER_SSH_KEY }}
run: |
install -d -m 700 ~/.ssh
printf '%s\n' "$PACKAGE_SERVER_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H packages.gradientlinux.io >> ~/.ssh/known_hosts
- name: Publish to APT repo
run: bash scripts/apt/publish.sh "${GITHUB_REF_NAME}"
env:
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}