Skip to content

Commit 4032340

Browse files
committed
Added building and packaging node projects.
1 parent bbee3ce commit 4032340

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: Publish
22

33
on:
44
push:
5-
branches:
6-
- main
7-
# tags:
8-
# - 'v[1-9].*'
5+
tags:
6+
- 'v[1-9].*'
97

108
jobs:
119
build:
@@ -16,21 +14,39 @@ jobs:
1614
uses: actions/setup-dotnet@v4
1715
with:
1816
dotnet-version: 8.0.x
19-
- name: Restore dependencies
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
- name: Restore C# dependencies
2022
run: dotnet restore
21-
- name: Build
23+
- name: Restore eslint-config-rock-recommended dependencies
24+
run: npm ci
25+
working-directory: ./src/eslint-config-rock-recommended
26+
- name: Restore obsidian-build-tools dependencies
27+
run: npm ci
28+
working-directory: ./src/obsidian-build-tools
29+
- name: Build C#
2230
run: dotnet build --no-restore
2331
- name: Test
2432
run: dotnet test --no-build --verbosity normal
25-
- name: Pack
33+
- name: Pack C#
2634
run: dotnet pack --output .
35+
- name: Build obsidian-build-tools
36+
run: npm run build
37+
working-directory: ./src/obsidian-build-tools
38+
- name: Pack obsidian-build-tools
39+
run: npm run pack --pack-destination ../..
40+
working-directory: ./src/obsidian-build-tools
2741
- name: List
28-
run: ls -l *.nupkg
42+
run: ls -l *.nupkg *.
2943
- name: Archive packages
3044
uses: actions/upload-artifact@v4
3145
with:
3246
name: packages
33-
path: "*.nupkg"
47+
path: |
48+
"*.nupkg"
49+
"*.tgz"
3450
if-no-files-found: error
3551
retention-days: 30
3652
# - name: Publish

0 commit comments

Comments
 (0)