mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-04-22 18:52:09 +00:00
42 lines
861 B
YAML
42 lines
861 B
YAML
name: Publish the Package
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Publishing to NPMJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Publish on NPM
|
|
run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Setup Publishing to Github Packages
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
registry-url: 'https://npm.pkg.github.com'
|
|
|
|
- name: Publish on Github
|
|
run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.REPO_TOKEN }}
|