Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add release-please workflow #41

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}