Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 5c5323c

Browse files
12wrigjacopybara-github
authored andcommitted
Split NPM actions on release creation between those that use the public NPM
registry (install) and those that use Wombat Dressing Room (publish). Configure all workflows to use current LTS versions of NodeJS. RELNOTES: n/a PiperOrigin-RevId: 465435441 Change-Id: Icb5adb089b1068c324e9539498c1740f532d92a6
1 parent 60773f1 commit 5c5323c

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/draft-github-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v2
13+
uses: actions/setup-node@v3
1314
with:
15+
node-version: current
1416
# We need to fetch the full repository in order to write complete
1517
# release notes.
1618
fetch-depth: 0

.github/workflows/publish-on-npm.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Publish on NPM
33
on:
44
release:
55
types: [ published ]
6+
# Allow this workflow to be manually dispatched from the GitHub Actions UI or CLI
7+
# in order to manually create or retry releases. This should not be necessary most of the time, as
8+
# the 'on: release' trigger above should suffice.
9+
workflow_dispatch:
610

711
permissions:
812
contents: read
@@ -13,11 +17,23 @@ jobs:
1317
steps:
1418
# This action checks out at the commit of the tagged release.
1519
- uses: actions/checkout@v2
20+
# Install all deps in preparation for creating a release.
21+
# Unlike publishing, this is done using the normal NPM registry
22+
# to download deps.
1623
- uses: actions/setup-node@v3
1724
with:
25+
node-version: current
26+
# TODO: We should check in a lockfile and use npm ci here instead.
27+
- run: npm install
28+
29+
# Re-setup node using Wombat Dressing Room as the registry
30+
# The actual NodeJS binaries and such are cached, so doing this
31+
# twice isn't particularly expensive.
32+
- uses: actions/setup-node@v3
33+
with:
34+
node-version: current
1835
registry-url: https://wombat-dressing-room.appspot.com
1936
# Publish google-closure-library.
20-
- run: npm install
2137
- run: npm publish
2238
env:
2339
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_GOOGLE_CLOSURE_LIBRARY }}

0 commit comments

Comments
 (0)