-
Notifications
You must be signed in to change notification settings - Fork 10
66 lines (57 loc) · 2.04 KB
/
Copy pathtarballs.yml
File metadata and controls
66 lines (57 loc) · 2.04 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
on:
workflow_call:
inputs:
upload:
type: boolean
description: true means test, then upload them AWS
required: false
version:
type: string
required: false
description: version for upload. do not include the 'v'
channel:
type: string
required: false
description: channel that the uploaded tarballs get promoted to
nodeVersion:
type: string
default: lts/*
description: node version to use for the tarball build
jobs:
tarballs:
env:
SF_DISABLE_TELEMETRY: true
runs-on: ubuntu-22-8core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: pack tarballs
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
command: yarn pack:tarballs
retry_on: error
- run: yarn pack:verify
- run: yarn test:smoke-unix
- if: inputs.upload
run: yarn upload:tarballs
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- if: inputs.upload && inputs.version && inputs.channel
run: yarn channel:promote --cli sf --version "$INPUTS_VERSION" --target "$INPUTS_CHANNEL"
env:
INPUTS_VERSION: ${{ inputs.version }}
INPUTS_CHANNEL: ${{ inputs.channel }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- if: inputs.upload
run: |
gh release upload "$INPUTS_VERSION" ./dist/*.gz --clobber --repo "$GITHUB_REPOSITORY"
gh release upload "$INPUTS_VERSION" ./dist/*.xz --clobber --repo "$GITHUB_REPOSITORY"
env:
INPUTS_VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}