-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (57 loc) · 2.36 KB
/
release-build-publish.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# DX@Scale CI/CD Template for GitHub
#----------------------------------------------------------------------------------------------------
# Maintained by @aly76 for DX@Scale
# Follows reference pipeline available at docs.dxatscale.io
#
#-----------------------------------------------------------------------------------------------------
# To know more about dxatscale, visit https://docs.dxatscale.io
# To know more on sfpowerscripts, visit- https://docs.dxatscale.io/sfpowerscripts/sfpowerscripts
# This pipeline builds on a release branch. Assumes you've cherry-picked a fix from master (thats been tested in DEV etc). Makes the change available for release
name: "CI Pipeline - Release Build - Auto Triggered"
on:
push:
branches:
- release/**
workflow_dispatch:
#Set the environment variables for tracking metrics
#env:
#SFPOWERSCRIPTS_NEWRELIC: 'true'
#SFPOWERSCRIPTS_NEWRELIC_API_KEY: '${{ secrets.NEWRELIC_INSIGHT_INSERT_KEYS }}'
#SFPOWERSCRIPTS_DATADOG: 'true'
#SFPOWERSCRIPTS_DATADOG_HOST: '${{ secrets.DATADOG_HOST }}'
#SFPOWERSCRIPTS_DATADOG_API_KEY: '${{ secrets.DATADOG_API_KEY }}'
jobs:
buildAndPublish:
name: "Build and Publish"
runs-on: ubuntu-latest
container: ghcr.io/dxatscale/sfpowerscripts
concurrency: build
if: contains(github.ref,'release') || github.ref == 'refs/heads/release/**'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Authenticate Dev Hub"
run: |
echo "${{ secrets.DEVHUB_SFDX_AUTH_URL }}" > ./authfile
sf org login sfdx-url -f authfile -a devhub
- name: "Create packages"
id: sfpowerscripts-build
run: |
# Note: Temporarily disabling --diffcheck for debugging
sfp orchestrator:quickbuild -v devhub --branch ${GITHUB_REF#refs/heads/} --buildnumber ${GITHUB_RUN_ID}
# Publish artifacts
- uses: actions/upload-artifact@v2
with:
node-version: "16.x"
name: build-artifacts
path: artifacts
- uses: actions/setup-node@v3
with:
registry-url: "https://npm.pkg.github.com"
scope: "@${{ github.repository_owner }}"
- name: Publish
run: |
sfp orchestrator:publish -d artifacts --npm --scope @${{ github.repository_owner }} --gittag --pushgittag
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}