-
Notifications
You must be signed in to change notification settings - Fork 32
39 lines (35 loc) · 1020 Bytes
/
Copy pathcd.yml
File metadata and controls
39 lines (35 loc) · 1020 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
34
35
36
37
38
name: CD
on:
workflow_dispatch:
# push:
# branches: [ master ]
permissions:
id-token: write # Required for OIDC
contents: write # Read required for OIDC but write required for release tagging
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: https://registry.npmjs.org/
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- run: npm ci
- run: npm test
- run: npm publish
- 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 }}