Skip to content

Merge pull request #167 from VWBL/[email protected] #65

Merge pull request #167 from VWBL/[email protected]

Merge pull request #167 from VWBL/[email protected] #65

Workflow file for this run

name: Publish npm package
on:
push:
branches:
- master
tags:
- '*'
env:
# Check available versions below
# https://github.com/actions/node-versions/blob/main/versions-manifest.json
node-version: "20.x"
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: node_modules cache
uses: actions/cache@v2
id: cache_node_modules
with:
# キャッシュキー完全一致しない場合 npm installする必要があるのでrestore-keysは使わない
key: ${{ runner.os }}-build-node_modules-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }}
path: '**/node_modules'
- name: Install Dependencies
if: steps.cache_node_modules.outputs.cache-hit != 'true'
run: npm install
publish-core&evm&xrpl:

Check failure on line 36 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish npm package

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 36, Col: 3): The identifier 'publish-core&evm&xrpl' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.

Check failure on line 36 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish npm package

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 36, Col: 3): The identifier 'publish-core&evm&xrpl' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
if: contains(github.ref, 'tags/core')
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: node_modules cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-build-node_modules-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }}
path: '**/node_modules'
- name: Build
run: npm run build:all
- name: Check if vwbl-core package version can be published
uses: technote-space/package-version-check-action@v1
with:
PACKAGE_DIR: 'packages/core/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_MANAGER: npm
- name: Check if vwbl-sdk(evm chain) package version can be published
uses: technote-space/package-version-check-action@v1
with:
PACKAGE_DIR: 'packages/evm/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_MANAGER: npm
- name: Check if vwbl-sdk-xrpl package version can be published
uses: technote-space/package-version-check-action@v1
with:
PACKAGE_DIR: 'packages/xrpl/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_MANAGER: npm
- name: Publish vwbl-core package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc && npm run publish:core
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Publish vwbl-sdk(evm chain) package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc && npm run publish:evm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Publish vwbl-sdk-xrpl package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc && npm run publish:xrpl
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
publish-evm:
if: contains(github.ref, 'tags/evm')
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
id: setup-node
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: node_modules cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-build-node_modules-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }}
path: '**/node_modules'
- name: Build
run: npm run build:all
- name: Check if vwbl-sdk(evm chain) package version can be published
uses: technote-space/package-version-check-action@v1
with:
PACKAGE_DIR: 'packages/evm/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_MANAGER: npm
- name: Publish vwbl-sdk(evm chain) package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc && npm run publish:evm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
publish-xrpl:
if: contains(github.ref, 'tags/xrpl')
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: node_modules cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-build-node_modules-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }}
path: '**/node_modules'
- name: Build
run: npm run build:all
- name: Check if vwbl-sdk-xrpl package version can be published
uses: technote-space/package-version-check-action@v1
with:
PACKAGE_DIR: 'packages/xrpl/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_MANAGER: npm
- name: Publish vwbl-sdk-xrpl package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc && npm run publish:xrpl
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}