Skip to content

Merge pull request #15 from blinkafrica/main #27

Merge pull request #15 from blinkafrica/main

Merge pull request #15 from blinkafrica/main #27

Workflow file for this run

# name: Publish package to NPM registry
# # on:
# # workflow_run:
# # workflows: [CI]
# # branches: [main]
# # types: [completed]
# on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
# concurrency: ${{ github.workflow }}-${{ github.ref }}
# jobs:
# publish:
# # if: ${{ github.event.workflow_run.conclusion == 'success' }}
# runs-on: ubuntu-latest
# permissions:
# contents: write
# pull-requests: write
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Use Node.js 20
# uses: actions/setup-node@v4
# with:
# node-version: 20
# registry-url: 'https://registry.npmjs.org'
# cache: 'yarn'
# - name: Install
# run: yarn install --frozen-lockfile
# - name: Build
# run: yarn build
# - name: Create Release Pull Request or Publish
# id: changesets
# uses: changesets/action@v1
# with:
# publish: yarn run release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish package to NPM registry
on:
push:
branches:
- release
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build and publish
run: |
yarn build
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}