Skip to content

Commit

Permalink
chore: update release-please.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
koladilip committed Jun 12, 2024
1 parent 34db761 commit a17249f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ permissions:
pull-requests: write

jobs:
release-please:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Extract Branch Name
shell: bash
Expand All @@ -25,38 +27,38 @@ jobs:
with:
token: ${{ github.token }}
release-type: node

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:
if: ${{ steps.release.outputs.release_created }}

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

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

- name: Build Package
run: npm run build
if: ${{ steps.release.outputs.release_created }}

- name: Configure NPM
run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}

- name: Publish Package to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}

- name: Assume IAM Role and Set AWS Credentials
id: assume-role
Expand Down

0 comments on commit a17249f

Please sign in to comment.