Repository navigation
69 lines (63 loc) · 2.35 KB
/
Copy pathrelease.yml
File metadata and controls
69 lines (63 loc) · 2.35 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
name: Release
# shipmill: https://github.com/shipmill/shipmill. The policy in
# .github/shipmill.toml decides what releases and when; this file only wires
# shipmill's workflows to this repository's CI.
on:
push:
branches: [main]
schedule:
- cron: "7 * * * *" # hourly: the policy decides whether a lane's window is open
workflow_dispatch:
inputs:
lane:
description: "policy: follow the policy; a lane: release it now, skipping triggers but not gates"
type: choice
options: [policy, dev, rc, stable, hotfix]
default: policy
dry-run:
description: "Show the release commit, push nothing"
type: boolean
default: true
hotfix-prs:
description: "hotfix: merged pull requests to ship, such as 12,15"
type: string
default: ""
hotfix-from:
description: "hotfix: the stable tag to fix; empty takes the latest"
type: string
default: ""
permissions:
contents: read
jobs:
prepare:
uses: shipmill/shipmill/.github/workflows/prepare.yml@v0
with:
lane: ${{ inputs.lane != 'policy' && inputs.lane || '' }}
dry-run: ${{ inputs.dry-run || false }}
hotfix-prs: ${{ inputs.hotfix-prs || '' }}
hotfix-from: ${{ inputs.hotfix-from || '' }}
permissions:
contents: write # pushes the release commit's work branch
issues: write # blockers and milestones; opens the issue a hold or release = "propose" leads to
pull-requests: read # a hotfix's merge commits
actions: read # replaces a work branch a cancelled run left, once no other run owns it
ci:
needs: prepare
if: needs.prepare.outputs.sha != ''
uses: ./.github/workflows/ci.yml
with:
ref: ${{ needs.prepare.outputs.sha }}
land:
needs: [prepare, ci]
if: always() && needs.prepare.outputs.sha != ''
uses: shipmill/shipmill/.github/workflows/land.yml@v0
with:
ci-result: ${{ needs.ci.result }}
lane: ${{ needs.prepare.outputs.lane }}
version: ${{ needs.prepare.outputs.version }}
sha: ${{ needs.prepare.outputs.sha }}
base: ${{ needs.prepare.outputs.base }}
permissions:
contents: write # main, release branches, tags, and releases
actions: write # starts the lane's dispatch workflows
issues: write # closes the issue release = "propose" opens, once the lane released