refactor: Remove swc-plugins
(#64)
#164
This file contains 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: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: [opened, synchronize] | |
merge_group: | |
env: | |
CI: 1 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: "${{ github.event_name == 'pull_request' }}" | |
jobs: | |
test-node: | |
name: Test node packages | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
env: | |
DISPLAY: ":99" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Cache turbo build setup | |
uses: actions/cache@v3 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- uses: nanasess/setup-chromedriver@v2 | |
- run: | | |
chromedriver --url-base=/wd/hub & | |
- uses: browser-actions/setup-firefox@v1 | |
- run: pnpm turbo run --cache-dir='.turbo' test | |
ci-done: | |
name: CI Done | |
needs: | |
- test-node | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: exit 1 | |
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} | |
publish-npm: | |
name: Publish to npm | |
runs-on: ubuntu-latest | |
needs: ci-done | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Set publishing config | |
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- run: pnpm publish -r --access public |