Skip to content

Commit d8b7631

Browse files
chore: Add publish step to GHA release workflow (#1617)
1 parent 53f07cc commit d8b7631

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/prod-release.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,27 @@ jobs:
6363
# Log the commit for posterity
6464
git log -n 1
6565
66-
# Once semantic versioning has run and bumped versions, publish to npm
67-
# TODO: Publish step that doesn't use OTP but instead follows
68-
# https://docs.npmjs.com/trusted-publishers
66+
publish:
67+
runs-on: ubuntu-latest
68+
needs: [pre-release-ci, version]
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- uses: actions/setup-node@v4
73+
with:
74+
node-version: '20'
75+
registry-url: 'https://registry.npmjs.org'
76+
77+
# Ensure npm 11.5.1 or later is installed
78+
- name: Update npm
79+
run: npm install -g npm@latest
80+
- run: npm ci --unsafe-perm
81+
- run: npm run build --if-present
82+
- run: npx lerna publish from-package --yes --dist-tag ${{ github.event.inputs.dist_tag }}
6983

7084
# Once publishing is complete, validate that the published packages are useable
7185
validate:
7286
uses: ./.github/workflows/shared-ci.yml
73-
# TODO: Uncomment when adding publish step
74-
# needs: [publish]
87+
needs: [publish]
7588
with:
7689
test-published-packages: true

0 commit comments

Comments
 (0)