fix: tsup bundeling #25
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: Test, Build, and release | |
on: | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
test: | |
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: ['18.x', '20.x'] | |
os: | |
- ubuntu-latest | |
# - windows-latest | |
# - macOS-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- name: Install dependencies π¦ | |
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc | |
run: npm install | |
- name: Lint π | |
run: npm run lint | |
- name: Test π§ͺ | |
run: npm run test --ci --coverage --maxWorkers=2 | |
- name: Build π | |
# run: yarn prepare | |
run: npm run build | |
release: | |
name: Release | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
registry-url: https://npm.pkg.github.com | |
always-auth: true | |
scope: '@hudora' | |
- name: Install dependencies π¦ | |
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc | |
run: npm install | |
- name: Build π | |
# run: yarn prepare | |
run: npm run build | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release | |
# - name: Deploy storybook to GitHub Pages | |
# run: npm run storybook-deploy --ci | |
# env: | |
# GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} | |
# - name: Deploy documentation to GitHub Pages | |
# run: yarn run doc:build ; yarn run doc:publish | |
# env: | |
# GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} |