fix: update-release-please (#274) #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: # <- this allows triggering from github's UI | |
push: | |
branches: | |
- main | |
paths: | |
- '*' | |
- '.github/workflows/*' | |
- 'packages/soql-builder-ui/**' | |
name: release-soql-builder-ui | |
jobs: | |
release-soql-builder-ui: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: GoogleCloudPlatform/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: node | |
path: packages/soql-builder-ui | |
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-builder-ui | |
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-builder-ui | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |