-
Notifications
You must be signed in to change notification settings - Fork 32
34 lines (31 loc) · 832 Bytes
/
cd.yml
File metadata and controls
34 lines (31 loc) · 832 Bytes
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
name: CD
on:
workflow_dispatch:
# push:
# branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
- uses: sergeysova/jq-action@v2
name: Derive Version
id: version
with:
cmd: 'jq .version package.json -r'
- uses: elgohr/Github-Release-Action@v5
name: Create Tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: Release ${{ steps.version.outputs.value }}
tag: ${{ steps.version.outputs.value }}