From 9ff7ed7b932ff714090bbbecf852e861f19a3dcd Mon Sep 17 00:00:00 2001 From: erezrokah Date: Thu, 15 Apr 2021 15:22:34 +0400 Subject: [PATCH] chore: automate npm publishing --- .github/workflows/release-please.yml | 12 ++++++++++++ CONTRIBUTING.md | 5 +---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6b5c2767..fdb045b0 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -13,8 +13,20 @@ jobs: private-key: ${{ secrets.TOKENS_PRIVATE_KEY }} app-id: ${{ secrets.TOKENS_APP_ID }} - uses: GoogleCloudPlatform/release-please-action@v2 + id: release with: token: ${{ steps.get-token.outputs.token }} release-type: node package-name: '@netlify/netlify-functions-js' bump-minor-pre-major: true + - uses: actions/checkout@v2 + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v2 + with: + node-version: '15' + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + if: ${{ steps.release.outputs.release_created }} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5dfd0c02..59222dbb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,4 @@ After submitting the pull request, please make sure the Continuous Integration c ## Releasing -1. Merge the release PR -2. Switch to the default branch `git checkout main` -3. Pull latest changes `git pull` -4. Publish the package `npm publish` +Merge the release PR