-
Notifications
You must be signed in to change notification settings - Fork 17
44 lines (40 loc) · 1.3 KB
/
publish.yml
File metadata and controls
44 lines (40 loc) · 1.3 KB
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 Version
on:
workflow_dispatch:
inputs:
version:
description: Version
default: 0.6.0
required: true
packages:
description: 'Comma-separated list of packages to publish (e.g. @testring/cli,@testring/api). Leave empty to publish all.'
required: false
default: ''
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24.x'
package-manager-cache: false
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- run: npm ci
- run: npm run build:main
- run: npm run publish:version ${{ github.event.inputs.version }}
- name: Publish to npm
run: |
ARGS="--exclude=@testring/devtool-frontend,@testring/devtool-backend,@testring/devtool-extension"
if [ -n "${{ github.event.inputs.packages }}" ]; then
ARGS="$ARGS --include=${{ github.event.inputs.packages }}"
fi
node ./utils/publish.js $ARGS
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}