Skip to content

Commit 452b16c

Browse files
authored
chore: add CD workflow (#1706)
1 parent 1ef992c commit 452b16c

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/cd.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CD
2+
3+
concurrency: production
4+
5+
on:
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
type: choice
11+
required: true
12+
description: Version
13+
options:
14+
- conventional
15+
- patch
16+
- minor
17+
- major
18+
- prerelease
19+
prerelease:
20+
type: choice
21+
required: false
22+
description: Pre-release
23+
options:
24+
-
25+
- canary
26+
- beta
27+
28+
jobs:
29+
deploy:
30+
runs-on: ubuntu-latest
31+
environment: production
32+
permissions:
33+
contents: write
34+
id-token: write
35+
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
steps:
41+
- uses: actions/checkout@v3
42+
with:
43+
fetch-depth: 0 # Fetch all history for all tags and branches
44+
- uses: actions/setup-node@v3
45+
with:
46+
# this line is required for the setup-node action to be able to run the npm publish below.
47+
registry-url: 'https://registry.npmjs.org'
48+
- uses: fregante/setup-git-user@v1
49+
- run: npm ci
50+
- run: npm run lint
51+
- run: npm run test:coverage
52+
- run: npm run build:lib
53+
- run: npm run build:demo
54+
- run: npm run build:dist
55+
- run: npm run build:standalone
56+
- run: npx --yes [email protected] release ${{ inputs.version }} --prerelease "${{ inputs.prerelease }}" --provenance --changelog --github-release

0 commit comments

Comments
 (0)