Merge pull request #2207 from sushiswap/solvbtc_ena #563
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publishing Default Token List to NPM" | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "lists/token-lists/default-token-list/tokens/**" | |
workflow_call: | |
inputs: | |
if_bump: | |
type: boolean | |
required: false | |
secrets: | |
NPM_TOKEN: | |
required: true | |
env: | |
CI: true | |
PNPM_CACHE_FOLDER: .pnpm-store | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18] | |
pnpm-version: [8.9.2] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/[email protected] | |
with: | |
version: ${{ matrix.pnpm-version }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: pnpm run test | |
working-directory: './lists/token-lists/default-token-list' | |
- run: pnpm run build | |
working-directory: './lists/token-lists/default-token-list' | |
- if: inputs.if_bump == true | |
name: bump & publish | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "tokenlistform[bot]" | |
pnpm run ci:version | |
pnpm run ci:publish | |
git push | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |