Implement theme #145
Workflow file for this run
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 Package to npm | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: write-all | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Cargo tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - uses: jetli/[email protected] | |
| with: | |
| version: 'latest' | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| registry-url: "https://registry.npmjs.org" | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - run: pnpm i | |
| - run: | | |
| pnpm build | |
| pnpm lint | |
| pnpm test | |
| - name: Build Landing | |
| run: pnpm -F landing build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./apps/landing/out | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| - uses: actions/deploy-pages@v4 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm changeset publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| if: github.ref == 'refs/heads/main' |