-
Notifications
You must be signed in to change notification settings - Fork 139
102 lines (82 loc) · 2.82 KB
/
Copy pathpublish.yml
File metadata and controls
102 lines (82 loc) · 2.82 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Publish
on:
workflow_dispatch:
inputs:
dry-run:
description: 'Dry run (skip actual publishing)'
type: boolean
default: false
permissions:
contents: read
env:
NPM_CONFIG_AUDIT: "false"
NPM_CONFIG_FUND: "false"
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
NUGET_XMLDOC_MODE: "skip"
jobs:
pack:
runs-on: ubuntu-24.04
env:
RELEASE_KEY_SECRET: ${{ secrets.RELEASE_KEY_SECRET }}
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-quality: ga
dotnet-version: |
3.1
8.0
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: actions/checkout@v4
- name: Decrypt signing key
if: ${{ env.RELEASE_KEY_SECRET != '' }}
run: |
wget https://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
curl -L -o /opt/secure-file.zip https://github.com/appveyor/secure-file/releases/download/1.0.1/secure-file.zip
unzip /opt/secure-file.zip -d /opt/secure-file
dotnet /opt/secure-file/secure-file.dll -decrypt net/DevExtreme.AspNet.Data/release.snk.enc -secret ${{ env.RELEASE_KEY_SECRET }}
- name: Build no-jquery package
run: node build/make-nojquery
- name: Set package versions
run: node build/replace-meta "${{ github.run_number }}" "${{ github.ref }}" "${{ github.repository }}"
- name: Pack npm packages
run: |
npm pack
npm pack ./js-nojquery
- name: Pack NuGet package
if: ${{ env.RELEASE_KEY_SECRET != '' }}
run: dotnet pack net/DevExtreme.AspNet.Data --configuration=Release --include-symbols
- name: Upload NuGet packages as artifacts
if: ${{ env.RELEASE_KEY_SECRET != '' }}
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: net/DevExtreme.AspNet.Data/bin/Release/*.nupkg
- name: Upload npm packages as artifacts
uses: actions/upload-artifact@v4
with:
name: npm-packages
path: devextreme-aspnet-data-*.tgz
publish:
runs-on: ubuntu-latest
needs: pack
if: startsWith(github.ref, 'refs/tags/')
environment: npmjs
permissions:
contents: read
id-token: write
steps:
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- uses: actions/download-artifact@v4
with:
name: npm-packages
- name: Publish to npmjs
run: |
npm publish devextreme-aspnet-data-nojquery-*.tgz --provenance --access public ${{ inputs['dry-run'] && '--dry-run' || '' }}
npm publish devextreme-aspnet-data-[0-9]*.tgz --provenance --access public ${{ inputs['dry-run'] && '--dry-run' || '' }}