generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (37 loc) · 974 Bytes
/
publish-package.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
name: Publish Package
on:
workflow_dispatch:
push:
branches:
- main
jobs:
publish-package:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
target-branch: main
- name: Checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
# needed to use yarn v4
- name: Enable corepack
run: corepack enable
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
registry-url: https://registry.npmjs.org/
- name: Build
run: |
yarn install --immutable --check-cache
yarn build
yarn pack
- name: Publish
run: yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}