Skip to content

Merge pull request #2 from sebastienrousseau/dependabot/npm_and_yarn/… #27

Merge pull request #2 from sebastienrousseau/dependabot/npm_and_yarn/…

Merge pull request #2 from sebastienrousseau/dependabot/npm_and_yarn/… #27

Workflow file for this run

name: 🧪 Release
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
registry-url: "https://registry.npmjs.org" # Specify npm registry URL here for setup-node
scope: "@sebastienrousseau" # Ensure this matches your package scope
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # npm token for authentication
- run: pnpm install --frozen-lockfile
- run: pnpm run build
# Publish to npm on push to main branch
publish:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.2
with:
version: 7
- name: Configure npm for publishing
run: pnpm config set registry "https://registry.npmjs.org/"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: "pnpm"
registry-url: "https://registry.npmjs.org" # Specify npm registry URL here for setup-node
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Publish to npm
run: pnpm publish --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}