Repository navigation
70 lines (66 loc) · 2.54 KB
/
Copy pathbackfill-blockmaps.yml
File metadata and controls
70 lines (66 loc) · 2.54 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
name: backfill-blockmaps
# Uploads the .blockmap files electron-updater needs for a differential update next to desktop releases that
# shipped without them (2.2.0 through 2.4.1). Like release.yml's publish jobs, it runs in the release environment,
# checks out only .github/release/ and treats the published files as data; releasers only.
on:
workflow_dispatch:
inputs:
versions:
description: "Space-separated stable versions, such as 2.4.0 2.4.1"
required: true
type: string
dry_run:
description: "Build the blockmaps without uploading them"
required: false
type: boolean
default: true
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
jobs:
backfill:
if: github.repository == 'anomalyco/opencode' && github.ref == 'refs/heads/dev'
runs-on: ubuntu-24.04
environment: release
permissions:
contents: read
id-token: write
env:
OPENCODE_DRY_RUN: ${{ inputs.dry_run }}
steps:
- name: Check out release scripts
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ github.sha }}
sparse-checkout: /.github/release/
sparse-checkout-cone-mode: false
persist-credentials: false
- id: aws
name: Configure AWS credentials
if: inputs.dry_run != true
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
output-env-credentials: false
output-credentials: true
role-to-assume: arn:aws:iam::604439173067:role/github/opencode-release
role-session-name: opencode-${{ github.run_id }}
aws-region: us-east-1
- name: Cloudflare token
id: cloudflare-token
if: inputs.dry_run != true
run: bash .github/release/cloudflare-token.sh
env:
AWS_ACCESS_KEY_ID: ${{ steps.aws.outputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws.outputs.aws-secret-access-key }}
AWS_SESSION_TOKEN: ${{ steps.aws.outputs.aws-session-token }}
CLOUDFLARE_TOKEN_URL: ${{ vars.CLOUDFLARE_TOKEN_URL }}
- name: Backfill
run: |
read -ra versions <<< "$VERSIONS"
bash .github/release/backfill-blockmaps.sh "${versions[@]}"
env:
VERSIONS: ${{ inputs.versions }}
CLOUDFLARE_ACCOUNT_ID: 15d29c8639fd3733b1b5486a2acfd968
CLOUDFLARE_API_TOKEN: ${{ steps.cloudflare-token.outputs.token }}