Skip to content

Commit

Permalink
Add canary release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhacks committed Mar 5, 2023
1 parent 346fde0 commit b50d871
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "zod",
"version": "3.21.0-canary.20230304T235951",
"version": "3.21.0",
"description": "TypeScript-first schema declaration and validation library with static type inference",
"main": "./lib/index.js",
"types": "./index.d.ts",
Expand Down
45 changes: 45 additions & 0 deletions release-canary.yml
@@ -0,0 +1,45 @@
# .github/release.yml

name: Release on npm (canary)
on:
push:
branches:
- "master"
paths:
- package.json

jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16

- name: Install dependencies
run: |
yarn install
- name: Build
run: |
yarn clean
yarn build
- name: Set version
run: |
npm minor
npm version $(npm pkg get version | sed 's/"//g')-canary.$(date +'%Y%m%dT%H%M%S')
- id: publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: true
tag: canary

0 comments on commit b50d871

Please sign in to comment.