-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (57 loc) · 1.89 KB
/
release-soql-common.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
on:
workflow_dispatch: # <- this allows triggering from github's UI
push:
branches:
- main
paths:
- '*'
- '.github/workflows/*'
- 'packages/soql-common/**'
name: release-soql-common
jobs:
release-soql-common:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
path: packages/soql-common
monorepo-tags: true
default-branch: main
- run: |
echo 'Release outputs:${{ toJSON(steps.release.outputs) }}'
# Case 1:
# If this is not the result of a Release PR merge, then update version
# of internal dependencies on the release branch
- uses: actions/checkout@v2
if: ${{ ! steps.release.outputs.release_created }}
- name: bump-inter-dependencies-on-release-branch
if: ${{ ! steps.release.outputs.release_created }}
run: ./scripts/gh-action-bump-interdeps-versions-on-release-branch.sh soql-common
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Case 2:
# If this IS the result of a Release PR merge into main, then proceed to publish
# the npm package
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2
if: ${{ steps.release.outputs.release_created }}
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
scope: '@salesforce'
- name: build
if: ${{ steps.release.outputs.release_created }}
run: |
yarn
yarn build
- name: publish
if: ${{ steps.release.outputs.release_created }}
run: |
cd packages/soql-common
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}