Skip to content

Merge pull request #10 from NxtLvLSoftware/dev-to-dist #11

Merge pull request #10 from NxtLvLSoftware/dev-to-dist

Merge pull request #10 from NxtLvLSoftware/dev-to-dist #11

name: Publish Package
on:
push:
branches: [dist]
tags:
- '*'
permissions:
contents: read
jobs:
publish:
name: Publish to npm registry
runs-on: ubuntu-latest
timeout-minutes: 5
env:
NODE_VERSION: 18
steps:
- name: Wait for CI success
if: github.event_name == 'push'
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: Run tests
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Wait for example package CI success
if: github.event_name == 'push'
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: Run example package tests
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Wait for example project CI success
if: github.event_name == 'push'
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: Run example project tests
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Publish ${{ github.ref_name }} to npm registry
run: |
npm publish --access public --tag ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}