-
Notifications
You must be signed in to change notification settings - Fork 23
89 lines (79 loc) · 3.2 KB
/
release.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
78
79
80
81
82
83
84
85
86
87
88
on:
release:
types: [ published ]
branches: [ main ]
workflow_call:
workflow_dispatch:
permissions:
contents: read
actions: read
name: Release
jobs:
build:
uses: ./.github/workflows/continuous-integration.yml
upload:
name: Upload Release Asset
needs: build
runs-on: windows-latest
permissions:
contents: write
steps:
# Using shared artifact from build workflow
- name: Download Artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: shell-binaries
path: ${{ github.workspace }}/shell-binaries
- name: Display structure of downloaded files
run: Get-ChildItem -Recurse
working-directory: ${{ github.workspace }}/shell-binaries
- name: Compress
run: Compress-Archive -Path ${{ github.workspace }}/shell-binaries/* composeui-${{ github.ref_name }}-win32.zip
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./composeui-${{ github.ref_name }}-win32.zip
asset_name: composeui-${{ github.ref_name }}-win32.zip
asset_content_type: application/zip
deploy-npm:
name: Publish Package to npmjs
runs-on: windows-latest
needs: upload
permissions:
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- run: |
lerna publish from-package --no-private --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
deploy-nuget:
name: Publish messaging packages to nuget.org
runs-on: windows-latest
needs: build
env:
nuget_source: https://api.nuget.org/v3/index.json
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: packages
path: ./packages
- uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: 6.0.x
- name: Publish Messaging packages
working-directory: ./packages
run: |
dotnet nuget push MorganStanley.ComposeUI.Messaging.Core.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ env.nuget_source }} --skip-duplicate
dotnet nuget push MorganStanley.ComposeUI.Messaging.Server.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ env.nuget_source }} --skip-duplicate
dotnet nuget push MorganStanley.ComposeUI.Messaging.Client.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ env.nuget_source }} --skip-duplicate
dotnet nuget push MorganStanley.ComposeUI.Messaging.Host.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ env.nuget_source }} --skip-duplicate