chore: add compress:avatar script for reproducible meshopt compression #62
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: 🚀 Publish to npm | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'src/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig*.json' | |
| - 'vite.config.mjs' | |
| - '.releaserc' | |
| - '.github/workflows/release.yml' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| env: | |
| ROLLUP_DISABLE_NATIVE: true | |
| permissions: | |
| contents: write | |
| issues: write | |
| steps: | |
| - name: ⬇️ Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| # Full history and tags so semantic-release can determine the last | |
| # released version instead of treating every run as a first release. | |
| fetch-depth: 0 | |
| - name: 🟦 Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: 🔐 Configure npm authentication | |
| run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > $HOME/.npmrc | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Clean npm cache | |
| run: | | |
| rm -rf node_modules | |
| npm cache clean --force | |
| - name: 📦 Install dependencies | |
| run: npm install | |
| - name: 🔨 Build project | |
| run: npm run build | |
| env: | |
| ROLLUP_DISABLE_NATIVE: true | |
| # Run manual | |
| # - name: 🚀 Publish to npm | |
| # run: npm publish --access public | |
| # env: | |
| # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: 🚀 Semantic Release | |
| run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |