55 required : true
66 gh_token :
77 required : true
8+ kambi_artifactory_api_key :
9+ required : true
10+
811jobs :
912 release :
1013 name : Release
1114 runs-on : ubuntu-latest
15+
16+ outputs :
17+ published : ${{ steps.changesets.outputs.published }}
1218 env :
1319 GH_PACKAGES_TOKEN : ${{ secrets.gh_packages_token }}
1420 NPM_TOKEN : ${{ secrets.gh_packages_token }}
@@ -25,16 +31,55 @@ jobs:
2531 uses : actions/setup-node@v4
2632 with :
2733 node-version : 18
28- cache : ' pnpm'
34+ cache : " pnpm"
2935 - name : Install dependencies
3036 run : pnpm install
3137 - name : Create Release Pull Request or Publish to npm
3238 id : changesets
3339 uses : changesets/action@v1
3440 with :
3541 version : pnpm run version
36- title : ' ci(root): release versions'
37- commit : ' ci(root): release versions'
42+ title : " ci(root): release versions"
43+ commit : " ci(root): release versions"
3844 publish : pnpm run release
3945 env :
4046 GITHUB_TOKEN : ${{ secrets.gh_token }}
47+
48+ publish-kambi :
49+ name : Publish to Kambi Artifactory
50+ needs : release
51+ if : needs.release.outputs.published == 'true'
52+ runs-on : [shape-games-kambi-hosted-debian, dedicated-shape-games]
53+ env :
54+ GITHUB_TOKEN : ${{ secrets.gh_token }}
55+ NPM_TOKEN : ${{ secrets.kambi_artifactory_api_key }}
56+ NPM_CONFIG_USERCONFIG : ${{ github.workspace }}/.npmrc
57+ steps :
58+ - name : Checkout Repo
59+ uses : actions/checkout@v4
60+
61+ - name : Install PNPM
62+ uses : pnpm/action-setup@v4
63+ with :
64+ version : 8
65+ - name : Setup Node.js
66+ uses : actions/setup-node@v4
67+ with :
68+ node-version : 18
69+ cache : " pnpm"
70+
71+ - name : Install dependencies
72+ run : pnpm install
73+
74+ - name : Setup NPM config for Kambi registry
75+ run : |
76+ # # # Configure workspace .npmrc
77+ echo "//artifactory.services.kambi.com/artifactory/api/npm/npm-shapegames/:_authToken=${NPM_TOKEN}" > .npmrc
78+ echo "registry=https://artifactory.services.kambi.com/artifactory/api/npm/npm-shapegames/" >> .npmrc
79+ echo "always-auth=true" >> .npmrc
80+
81+ - name : Build
82+ run : pnpm run build
83+
84+ - name : Publish to Kambi Artifactory
85+ run : pnpm run release
0 commit comments