Skip to content

Commit

Permalink
feat: add prerelease step to tests ci
Browse files Browse the repository at this point in the history
  • Loading branch information
CahidArda committed Oct 2, 2024
1 parent 93fcaf9 commit c3ded8a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,56 @@ jobs:
working-directory: examples/nextjs/vercel-ai-sdk
env:
DEPLOYMENT_URL: http://localhost:3000

release:
concurrency: release
outputs:
version: ${{ steps.version.outputs.version }}
needs:
- cloudflare-workers-local
- nodejs-local
# removed these two because they are skipped:
# - nextjs-chat-to-website
# - nextjs-server-actions
- nextjs-vercel-ai-sdk

name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Get version
id: version
run: echo "::set-output name=version::v0.0.0-ci.${GITHUB_SHA}-$(date +%Y%m%d%H%M%S)"

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Set version
run: |
echo $(jq --arg v "${{ steps.version.outputs.version }}" '(.version) = $v' package.json) > package.json
- name: Install Dependencies
run: bun install

- name: Build
run: bun run build

- name: Set NPM_TOKEN
run: npm config set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}

- name: Publish ci version
run: npm publish --tag=ci --verbose
working-directory: ./dist

- name: Sleep for 10s
run: sleep 10s
shell: bash

0 comments on commit c3ded8a

Please sign in to comment.