feat: add transformer option to zod #695
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: Publish | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18, 20, 21] | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
- name: NVM | |
id: nvm | |
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn test | |
- name: Upload dists | |
uses: actions/upload-artifact@v3 | |
if: matrix.node-version == steps.nvm.outputs.version | |
with: | |
if-no-files-found: error | |
name: dists | |
path: packages/**/dist | |
publish-npm: | |
name: GitHub & NPM | |
if: github.actor != 'renovate[bot]' | |
needs: [build] | |
runs-on: ubuntu-latest | |
environment: NPM | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PUSH_TOKEN }} | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
- name: Setup | |
run: | | |
yarn config set --home 'npmRegistries["https://registry.npmjs.org"].npmAuthToken' '${{ secrets.NPM_TOKEN }}' | |
yarn config set --home npmPublishRegistry https://registry.npmjs.org | |
yarn --immutable | |
- name: Download dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: dists | |
path: ~/dists | |
- name: Move dists to project | |
run: | | |
for package in ~/dists/* | |
do | |
mv "$package/dist" "packages/${package/$HOME\/dists\//}" | |
done | |
- name: Release | |
run: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |