-
Notifications
You must be signed in to change notification settings - Fork 224
50 lines (48 loc) · 1.64 KB
/
promote-windows.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
name: Promote signed Windows installer
on:
workflow_dispatch:
inputs:
version:
description: version to promote to stable (this should be the latest release version)
type: string
required: true
isStableRelease:
type: boolean
description: Is this a stable/prod release?
required: true
default: false
channel:
type: choice
description: Release channel for prereleases
required: false
options:
- beta
- alpha
jobs:
promote:
name: Promote ${{ inputs.version }} of the Windows installer to stable
runs-on: ubuntu-latest
env:
CLOUDFRONT_DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- run: yarn --immutable --network-timeout 1000000
- name: install apt-get dependencies
run: |
sudo apt-get update
sudo apt-get install -y awscli jq
- name: promote
env:
prerelease-channel: ${{ inputs.channel || 'beta'}}
run: |
SHA=$(npm view heroku@${{ inputs.version }} --json | jq -r '.gitHead[0:7]')
yarn oclif promote --win --root="./packages/cli" --sha="$SHA" --indexes --version=${{ inputs.version }} --channel=${{ fromJSON(inputs.isStableRelease) && 'stable' || env.prerelease-channel }}
shell: bash