feat: Add GHO, USDS (Sky), and MetaMask USD tokens (#12) #5
This file contains hidden or 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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "tokens/**" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Validate token list | |
| run: npm run validate | |
| - name: Create dist directory | |
| run: | | |
| mkdir -p dist | |
| # Extract version components | |
| VERSION=$(jq -r '"\(.version.major).\(.version.minor).\(.version.patch)"' tokens/token-list.json) | |
| MAJOR=$(jq -r '.version.major' tokens/token-list.json) | |
| MINOR=$(jq -r '.version.minor' tokens/token-list.json) | |
| # Copy with full version (e.g., v1.1.0.json) | |
| cp tokens/token-list.json dist/v${VERSION}.json | |
| # Copy with major.minor version (e.g., v1.1.json) | |
| cp tokens/token-list.json dist/v${MAJOR}.${MINOR}.json | |
| # Copy with major version only (e.g., v1.json) | |
| cp tokens/token-list.json dist/v${MAJOR}.json | |
| # Copy as latest (always points to newest) | |
| cp tokens/token-list.json dist/latest.json | |
| # Copy base file | |
| cp tokens/token-list.json dist/token-list.json | |
| echo "Created versioned files: v${VERSION}.json, v${MAJOR}.${MINOR}.json, v${MAJOR}.json, latest.json" | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist |