Skip to content

Commit

Permalink
add: github workflows release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithreum committed Jan 22, 2024
1 parent 2720828 commit 779f9cf
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Library build

on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install

- name: Build Package
run: npm run build

- name: prepare package
run: |
mkdir out
mv package.json out
mv dist out
mv README.md out
mv LICENSE out
mv .gitignore out
- name: List Contents of out folder
run: ls -R out

- name: Prepare Production Release
uses: s0/git-publish-subdir-action@develop
if: ${{ github.ref == 'refs/heads/main' }}
env:
REPO: self
BRANCH: production
FOLDER: out
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"

- name: Publish to NPM
run: |
cd out/
cp package.json ./dist/package.json
cp README.md ./dist/README.md
npm publish ./dist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions .npmignore

This file was deleted.

2 changes: 2 additions & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { polygon } from './polygon';
import { polygonMumbai } from './polygonMumbai';
import { sepolia } from './sepolia';

// https://github.com/wevm/viem/blob/main/src/chains/definitions

// MAINNETS:
export * from './arbitrum';
export * from './avalanche';
Expand Down
1 change: 1 addition & 0 deletions src/types/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

/**
* Circle contracts: https://developers.circle.com/stablecoins/docs/evm-smart-contracts
* Circle USDC: EVM & Non-EVM: https://www.circle.com/en/multichain-usdc
*/

import { TChainName } from "./chains";
Expand Down

0 comments on commit 779f9cf

Please sign in to comment.