Skip to content

Commit 9db8f36

Browse files
authored
Update publish.yml
1 parent 0b8d986 commit 9db8f36

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@ jobs:
2525
registry-url: https://registry.npmjs.org/
2626

2727

28+
- name: yarn install
29+
run: yarn install
30+
31+
- name: NuGet restore
32+
run: nuget restore example\windows\example.sln
33+
34+
- name: run CodeGen
35+
run: dotnet run -verbose -winmd ..\..\example\windows\packages\Microsoft.UI.Xaml.2.6.0\lib\uap10.0\Microsoft.UI.Xaml.winmd
36+
working-directory: package\Codegen
37+
38+
- name: verify no changes from CodeGen
39+
shell: powershell
40+
run: |
41+
$changed = git status --porcelain=v1
42+
if ($changed -ne $null) { throw "CodeGen detected changes" }
43+
44+
45+
- name: build TS
46+
run: yarn build
47+
2848
# - name: login
2949
# run: npm login --verbose
3050
# env:
@@ -39,11 +59,11 @@ jobs:
3959
run: npm config list --all
4060
env:
4161
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42-
43-
- name: publish to npmjs
44-
run: cd package && npm publish --access public && cd ..
45-
env:
46-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
63+
- uses: JS-DevTools/npm-publish@v1
64+
with:
65+
token: ${{ secrets.NPM_TOKEN }}
66+
check-version: true
4767

4868
- name: upload node logs
4969
uses: actions/[email protected]
@@ -53,22 +73,3 @@ jobs:
5373
continue-on-error: true
5474
if: always()
5575

56-
- name: yarn install
57-
run: yarn install
58-
59-
- name: NuGet restore
60-
run: nuget restore example\windows\example.sln
61-
62-
- name: run CodeGen
63-
run: dotnet run -verbose -winmd ..\..\example\windows\packages\Microsoft.UI.Xaml.2.6.0\lib\uap10.0\Microsoft.UI.Xaml.winmd
64-
working-directory: package\Codegen
65-
66-
- name: verify no changes from CodeGen
67-
shell: powershell
68-
run: |
69-
$changed = git status --porcelain=v1
70-
if ($changed -ne $null) { throw "CodeGen detected changes" }
71-
72-
73-
- name: build TS
74-
run: yarn build

0 commit comments

Comments
 (0)