Skip to content

Commit

Permalink
move npm-publish to main build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Mar 7, 2024
1 parent d29ed80 commit 629338b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 49 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,32 @@ jobs:

# ----- Only git tag testing + release deployment beyond this point ----- #

npm-publish:
needs: test
if: startsWith(github.ref, 'refs/tags/v') ||
github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/

- name: Publish @RC to npm
if: contains(github.ref, 'RC')
run: npm publish --tag RC
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish @latest to npm
if: contains(github.ref, 'RC') == false
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Publish the build to S3
publish:
# Setup
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/npm-publish.yml

This file was deleted.

0 comments on commit 629338b

Please sign in to comment.