Skip to content

Commit

Permalink
chore: add release-please workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulthink committed Oct 27, 2023
1 parent fd8783b commit 2d6a9e7
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

name: Release Please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
name: Release Please
uses: google-github-actions/release-please-action@v3

with:
release-type: node
package-name: @visgl/react-google-maps
bump-minor-pre-major: true

# Below are the actions for actual npm publishing when a release-branch was merged.

- if: ${{ steps.release.outputs.release_created }}
name: Checkout
uses: actions/checkout@v3

- if: ${{ steps.release.outputs.release_created }}
name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm

- if: ${{ steps.release.outputs.release_created }}
name: Install Dependencies
run: npm ci

- if: ${{ steps.release.outputs.release_created }}
name: Publish
# npm publish will trigger the build via the prepack hook
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

0 comments on commit 2d6a9e7

Please sign in to comment.