publish-canary #186
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-canary | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Dist tag for the release. If you chose something different than "canary", make sure to delete it once it is not needed anymore.' | |
type: string | |
required: false | |
default: 'canary' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: sap/ai-sdk-js/.github/actions/setup@main | |
with: | |
pnpm-install-args: '' | |
- name: prepare canary changeset | |
run: | | |
rm -f .changeset/*.md || true | |
cat <<EOT >> .changeset/canary-release-changeset.md | |
--- | |
'@sap-ai-sdk/core': patch | |
--- | |
Canary release | |
EOT | |
- name: publish | |
run: | | |
date=`date +%Y%m%d%H%M%S` | |
pnpm changeset pre enter ${date} | |
pnpm changeset version | |
pnpm changeset pre exit | |
pnpm changeset publish --tag ${{ github.event_name == 'schedule' && 'canary' || inputs.tag }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }} |