Use string-ts library and support zod default values (#18) #65
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: Main CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
pnpm-version: 8 | |
node-version: 20 | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.head_ref, 'changeset-release') }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache pnpm modules | |
uses: actions/[email protected] | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: ${{ env.pnpm-version }} | |
- uses: actions/[email protected] | |
with: | |
node-version: ${{ env.node-version }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Compile | |
run: pnpm compile | |
- name: Test | |
run: pnpm test | |
- name: Bundle | |
run: pnpm bundle | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache pnpm modules | |
uses: actions/[email protected] | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: ${{ env.pnpm-version }} | |
- uses: actions/[email protected] | |
with: | |
node-version: ${{ env.node-version }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |