fix: object mappings with child props (#124) #188
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: | |
push: | |
branches: | |
- 'main' | |
- 'release/*' | |
name: release-please | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- name: Extract Branch Name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ github.token }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ needs.release.outputs.release_created }} | |
steps: | |
# The logic below handles the npm publication: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# these if statements ensure that a publication only occurs when | |
# a new release is created: | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build Package | |
run: npm run build | |
- name: Configure NPM | |
run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | |
- name: Publish Package to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |