-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (53 loc) · 1.35 KB
/
cd.yml
File metadata and controls
68 lines (53 loc) · 1.35 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CD
on:
release:
types:
- published
jobs:
get-version:
name: Get Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version-without-v }}
steps:
- name: Get Version
id: get_version
uses: battila7/get-version-action@v2
ci:
needs:
- get-version
name: Run CI
uses: ./.github/workflows/ci.yml
with:
version: ${{ needs.get-version.outputs.version }}
secrets: inherit
publish:
needs:
- get-version
- ci
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Download Build
uses: actions/download-artifact@v8
with:
name: Build
path: dist
- name: Get Latest Tag
uses: tobysmith568/npm-publish-latest-tag@v1
id: latest_tag
with:
package-json: dist/packages/git-filesystem/package.json
- name: Publish
run: npx nx run-many --target publish --args="--tag=${{ steps.latest_tag.outputs.latest-tag }}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}