fix: exports (#4) #12
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: | |
jobs: | |
build: | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install | |
continue-on-error: false | |
run: yarn install --immutable --immutable-cache --check-cache | |
- name: Cache Save Node Modules | |
continue-on-error: false | |
id: cache-save | |
uses: actions/cache/save@v3 | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-nodeModules | |
- name: Test | |
continue-on-error: false | |
run: yarn test | |
- name: Build Library | |
continue-on-error: false | |
run: yarn build | |
- name: Upload Artifacts for Library | |
uses: actions/upload-artifact@v3 | |
with: | |
name: library | |
path: ./dist | |
retention-days: 1 | |
deploy: | |
needs: build | |
if: github.event_name == 'push' && contains(github.ref, '/main') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Download Artifacts for Library | |
continue-on-error: false | |
uses: actions/download-artifact@v3 | |
with: | |
name: library | |
path: ./dist | |
- name: Cache Restore Node Modules | |
continue-on-error: false | |
id: cache-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-nodeModules | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn semantic-release |