Skip to content

npm publish and remove aws deps #7

npm publish and remove aws deps

npm publish and remove aws deps #7

Workflow file for this run

name: Publish to NPM
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16, 18, 20]
os: [windows-latest, ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: test
run: npm run test:module
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 }}