-
Notifications
You must be signed in to change notification settings - Fork 946
59 lines (50 loc) · 1.73 KB
/
publish-sdks.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
name: Publish new generation SDKs
on:
push:
branches:
- main
# We allow manually dispatching workflow when needed. Most often, this will not be needed.
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-sdks:
name: Publish SDKs
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/checkout@v3
with:
# need this custom token to run CI checks on the created PR
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: 📥 Monorepo install
uses: ./.github/actions/yarn-nm-install
with:
cache-node-modules: true
cache-install-state: true
- name: Create Release PR & Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn workspace @builder.io/sdks ci:release
title: '📦 Publish SDKs'
commit: '📦 Publish SDKs'
env:
# need this custom token to run CI checks on the created PR
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
# probably don't need both of those, but it works!
NPM_TOKEN: ${{ secrets.NPM_SDK_RELEASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_SDK_RELEASE_TOKEN }}
# - name: Send Slack notification
# id: slack
# uses: slackapi/slack-github-action@v1.24.0
# with:
# payload: |
# { "publishedPackages": ${{ fromJson(steps.changesets.outputs.publishedPackages) }} }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}