forked from Qytera-Gmbh/cypress-xray-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 916 Bytes
/
Publish.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
name: Publish Package to npmjs
# see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
on:
release:
types: ["published"]
workflow_dispatch:
# manually triggered
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "npm"
registry-url: https://registry.npmjs.org/
- run: npm ci
# Run tests again to ensure quality.
- run: npm test
# Compile Typescript code to vanilla JavaScript + type declarations.
- run: npm run build
# Publish from inside the build directory.
- run: npm publish
working-directory: dist
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}