-
Notifications
You must be signed in to change notification settings - Fork 8
106 lines (104 loc) · 3.26 KB
/
nightly.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: nightly
on:
workflow_call:
inputs:
upload_artifacts:
required: false
type: boolean
default: true
upload_artifact:
required: false
type: boolean
default: true
go_version:
required: false
type: string
default: stable
lfs:
required: false
type: boolean
default: false
description: Whether to download Git-LFS files
secrets:
docker_username:
required: true
docker_token:
required: true
goreleaser_key:
required: true
gh_pat:
required: false
fury_token:
required: false
macos_sign_p12:
required: false
macos_sign_password:
required: false
macos_notary_key:
required: false
macos_notary_key_id:
required: false
macos_notary_issuer_id:
required: false
jobs:
nightly:
runs-on: ubuntu-latest
# dependabot-created PRs cant see any secrets, so this workflow wont work anyway https://github.com/dependabot/dependabot-core/issues/3253
if: ${{ github.actor != 'dependabot[bot]' }}
permissions:
contents: write
id-token: write
packages: write
env:
DOCKER_CLI_EXPERIMENTAL: enabled
GH_PAT: ${{ secrets.gh_pat }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: ${{ inputs.lfs }}
- run: |
git config --global url."https://${{ secrets.gh_pat }}@github.com/charmbracelet".insteadOf "https://github.com/charmbracelet"
git config --global url."https://${{ secrets.gh_pat }}@github.com/charmcli".insteadOf "https://github.com/charmcli"
if: env.GH_PAT != null
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go_version }}
cache: true
check-latest: true
- uses: sigstore/[email protected]
- uses: anchore/sbom-action/[email protected]
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
name: ghcr.io login
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
name: docker.io login
with:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_token }}
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
distribution: goreleaser-pro
args: release --clean --nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.goreleaser_key }}
FURY_TOKEN: ${{ secrets.fury_token }}
MACOS_SIGN_P12: ${{ secrets.macos_sign_p12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.macos_sign_password }}
MACOS_NOTARY_ISSUER_ID: ${{ secrets.macos_notary_issuer_id }}
MACOS_NOTARY_KEY_ID: ${{ secrets.macos_notary_key_id }}
MACOS_NOTARY_KEY: ${{ secrets.macos_notary_key }}
- uses: actions/upload-artifact@v4
if: ${{ inputs.upload_artifact == true && always() }}
with:
retention-days: 30
name: dist
path: |
dist