1+ # Copyright 2025 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # https://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ # A workflow that publishes the library to CocoaPods
16+ name : Publish
17+
18+ on :
19+ workflow_call : # called when release-please steps.release.outputs.release_created
20+ workflow_dispatch : # manually trigger if previous runs failed
21+
22+ concurrency :
23+ group : publishing
24+ cancel-in-progress : true
25+
26+ jobs :
27+ build-and-test :
28+ uses : ./.github/workflows/ci.yml
29+
30+ publish :
31+ runs-on : ubuntu-latest
32+ needs : build-and-test
33+ steps :
34+ - name : Checkout
35+ uses : actions/checkout@v4
36+
37+ - name : Setup Node for Dependency Installation
38+ uses : actions/setup-node@v4
39+ with :
40+ node-version : 20
41+ cache : npm
42+
43+ - name : Install Dependencies
44+ run : npm install --workspaces --include-workspace-root
45+
46+ # Now configure node with the registry used for publishing
47+ - name : Setup Node for Publishing
48+ uses : actions/setup-node@v4
49+ with :
50+ node-version : 20
51+ registry-url : ' https://wombat-dressing-room.appspot.com/'
52+
53+ - name : Publish
54+ # npm publish will trigger the build via the prepack hook
55+ run : npm publish --workspaces --include-workspace-root
56+ env :
57+ NODE_AUTH_TOKEN : ${{ secrets.NPM_WOMBOT_TOKEN }}
0 commit comments