forked from safe-global/safe-wallet-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (72 loc) · 2.72 KB
/
Copy pathweb-linear-release.yml
File metadata and controls
80 lines (72 loc) · 2.72 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
name: Linear Release (Web)
# Manual backfill / repair tool for the "Wallet" scheduled release pipeline in
# Linear. The normal flow is automated inside the release workflows:
# - web-release-start.yml -> `sync` + stage "Code Freeze" when a release is cut
# - web-tag-release.yml -> `complete` when the release is published
# Use this workflow to re-sync a release, fix a stage, or preview with dry_run.
#
# Setup: add the Wallet pipeline access key as the `LINEAR_ACCESS_KEY_WEB`
# repository secret (Settings -> Secrets and variables -> Actions). This must be
# a pipeline access key generated from the pipeline settings in Linear, not a
# personal API key.
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g. 1.92.0) - defaults to apps/web/package.json'
required: false
type: string
command:
description: 'Linear release command'
required: true
type: choice
default: sync
options:
- sync
- update
- complete
stage:
description: 'Deployment stage (required for the "update" command, e.g. Code Freeze)'
required: false
type: string
dry_run:
description: 'Preview the action without modifying Linear'
required: false
type: boolean
default: false
permissions: {}
concurrency:
group: linear-release-web-${{ inputs.version || github.ref }}
cancel-in-progress: false
jobs:
linear-release:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.0
with:
fetch-depth: 0 # Full history required to scan commits for Linear issue IDs
- name: Resolve release version
id: version
env:
INPUT_VERSION: ${{ inputs.version }}
run: |
if [ -n "$INPUT_VERSION" ]; then
VERSION="$INPUT_VERSION"
else
VERSION=$(node -p "require('./apps/web/package.json').version")
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Linear release version: $VERSION"
- name: Run Linear release (${{ inputs.command }})
uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0.14.5
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY_WEB }}
command: ${{ inputs.command }}
version: ${{ steps.version.outputs.version }}
stage: ${{ inputs.stage }}
# include_paths is only valid for `sync`; omit it for update/complete
include_paths: ${{ inputs.command == 'sync' && 'apps/web/**,packages/**' || '' }}
dry_run: ${{ inputs.dry_run }}