Repository navigation
85 lines (76 loc) · 2.18 KB
/
Copy pathrelease.yml
File metadata and controls
85 lines (76 loc) · 2.18 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Release
on:
workflow_dispatch:
permissions:
contents: read
defaults:
run:
shell: bash
concurrency:
group: release
cancel-in-progress: false
queue: max
jobs:
# NB: Retries are pinned to the authorized commit; advancing main does not change the source used.
authorize:
runs-on: ubuntu-26.04
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
persist-credentials: false
- &authorize
name: Require main and current repository administrators
env:
GH_TOKEN: ${{ github.token }}
run: ./release.sh --authorize
- name: Check release tag before building
run: ./release.sh --check-tag
checks:
needs: authorize
uses: ./.github/workflows/ci.yml
package:
needs: authorize
uses: ./.github/workflows/package.yml
with:
release: true
export_images: true
publish:
needs: [checks, package]
runs-on: ubuntu-26.04
environment: release
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
- *authorize
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: release-linux-*
path: dist
merge-multiple: true
- name: Publish verified bundles
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ needs.package.outputs.version }}
RELEASE_COMMIT: ${{ github.sha }}
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
./release.sh --publish
docker:
needs: [publish, package]
permissions:
contents: read
packages: write
uses: ./.github/workflows/docker-publish.yml
secrets: inherit
with:
commit: ${{ github.sha }}
version: ${{ needs.package.outputs.version }}
target: ${{ needs.package.outputs.version }}