generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (36 loc) · 1.08 KB
/
publish-canary.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}