add package to cli #32
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm i | |
| - name: Build | |
| run: npm run build | |
| - name: Test | |
| run: npm test | |
| - name: Deploy to cf-page branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| publish_branch: cf-page | |
| - name: Build standalone | |
| run: npm run build-standalone-prod | |
| - name: Install tree | |
| run: sudo apt-get install tree | |
| - name: Print file tree | |
| run: tree | |
| - name: Copy standalone.html | |
| run: | | |
| mkdir -p standalone | |
| cp dist/standalone.html standalone/ | |
| - name: Upload artifacts to tag | |
| uses: xresloader/upload-to-github-release@2bcae85344d41e21f7fc4c47fa2ed68223afdb49 | |
| with: | |
| file: standalone/* | |
| draft: false |