Merge pull request #244 from googlemaps/release-please--branches--mai… #155
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 | |
permissions: | |
contents: write | |
pull-requests: write | |
name: Release Please | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: node | |
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }} | |
package-name: release-please-action | |
bump-minor-pre-major: true | |
extra-files: src/base/constants.ts | |
# Everything below is for NPM publishing when a release is cut. | |
- uses: actions/checkout@v3 | |
# Note the "if" statement on all commands to make sure that publishing | |
# only happens when a release is cut. | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: google/wireit@setup-github-actions-caching/v1 | |
if: ${{ steps.release.outputs.release_created }} | |
- run: npm ci | |
if: ${{ steps.release.outputs.release_created }} | |
- run: npm run build:bundle | |
env: | |
WIREIT_FAILURES: continue | |
if: ${{ steps.release.outputs.release_created }} | |
# Now configure with the publish service for install. | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://wombat-dressing-room.appspot.com/' | |
if: ${{ steps.release.outputs.release_created }} | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
if: ${{ steps.release.outputs.release_created }} |