-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (65 loc) · 2.7 KB
/
publish-native-ts.yml
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
69
70
71
72
73
74
75
76
77
name: Publish Native NPM
on:
push:
branches:
- master
paths:
- '.github/workflows/publish-native-ts.yml'
- 'src/Bannerlord.LauncherManager/**.*'
- 'src/Bannerlord.LauncherManager.Native/**.*'
- 'src/Bannerlord.LauncherManager.Native.TypeScript/**.*'
workflow_dispatch:
jobs:
publish:
name: Publish on NPM and GPR
runs-on: windows-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup .NET 8
uses: actions/setup-dotnet@master
with:
dotnet-version: 8.x.x
- run: dotnet publish -r win-x64 --self-contained -c Debug src/Bannerlord.LauncherManager.Native
- run: dotnet publish -r win-x64 --self-contained -c Release src/Bannerlord.LauncherManager.Native
- run: dotnet test test/Bannerlord.LauncherManager.Native.Tests -c Debug
- run: dotnet test test/Bannerlord.LauncherManager.Native.Tests -c Release
- uses: actions/[email protected]
with:
node-version: 16
cache: 'npm'
cache-dependency-path: src/Bannerlord.LauncherManager.Native.TypeScript/package-lock.json
- run: |
cd ./src/Bannerlord.LauncherManager.Native.TypeScript && `
npm version $(node -p "require('./package.json').version = `
require('./package.json').version.split('.')[0]+'.' + `
require('./package.json').version.split('.')[1]+'.' + `
$(git rev-list --no-merges --count master)") --no-git-tag-version --allow-same-version;
- run: cd ./src/Bannerlord.LauncherManager.Native.TypeScript && npm ci
- run: cd ./src/Bannerlord.LauncherManager.Native.TypeScript && npm run test -- Debug
- run: cd ./src/Bannerlord.LauncherManager.Native.TypeScript && npm run test -- Release
- uses: actions/[email protected]
with:
node-version: 16
registry-url: https://registry.npmjs.org/
scope: '@butr'
- run: cd ./src/Bannerlord.LauncherManager.Native.TypeScript && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_NPM_TOKEN }}
- uses: actions/[email protected]
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
scope: '@butr'
- run: cd ./src/Bannerlord.LauncherManager.Native.TypeScript && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dispatch
uses: guilouro/multiple-repositories-dispatch@master
with:
repo_token: ${{secrets.REPO_ACCESS_TOKEN}}
repositories: |
BUTR/game-mount-and-blade2
event_type: vortex_extension_update
client_payload: '{"github": ${{ toJson(github) }}}'