-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (38 loc) · 1.21 KB
/
build-scanner-tarball.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
name: build-scanner-tarball
on:
workflow_call:
inputs:
target-branch:
description: "Which branch of the scanner should be built?"
required: false
type: string
default: "dev-4"
jobs:
build-tarball:
runs-on: ubuntu-latest
steps:
# Install Node and Java.
- name: 'Install Node LTS'
uses: actions/setup-node@v4
with:
node-version: 'lts/*' # Always use Node LTS for building the tarball.
- name: 'Install Java v11'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11' # Always use Java v11 for building the tarball.
- name: 'Check out, build, pack'
run: |
# Check out the target branch.
git clone -b ${{ inputs.target-branch }} https://github.com/forcedotcom/sfdx-scanner.git sfdx-scanner
cd sfdx-scanner
# Install and build dependencies.
yarn
yarn build
# Create the tarball.
npm pack
# Upload the tarball as an artifact so it's usable elsewhere.
- uses: actions/upload-artifact@v4
with:
name: scanner-tarball
path: ./**/salesforce-sfdx-scanner-*.tgz