-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (53 loc) · 2.35 KB
/
publish.yml
File metadata and controls
66 lines (53 loc) · 2.35 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
name: Publish NuGet Packages
on:
release:
types: [published]
env:
NUGET_SOURCE: ${{ vars.NUGET_SOURCE || 'https://api.nuget.org/v3/index.json' }}
jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Validate required secrets
run: |
if [ -z "${{ secrets.NUGET_TOKEN }}" ]; then
echo "::error::NUGET_TOKEN secret is not set. Please configure it in repository secrets."
exit 1
fi
echo "✓ NuGet token is configured"
echo "✓ Publishing to: ${{ env.NUGET_SOURCE }}"
- name: Checkout code
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Set version from release tag
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --configuration Release --no-restore /p:Version=$VERSION
- name: Pack packages
run: |
dotnet pack src/Ivy.Data.BigQuery/Ivy.Data.BigQuery.csproj --configuration Release --no-build --output ./artifacts /p:Version=$VERSION
dotnet pack src/Ivy.Data.BigQuery.NTS/Ivy.Data.BigQuery.NTS.csproj --configuration Release --no-build --output ./artifacts /p:Version=$VERSION
dotnet pack src/Ivy.EFCore.BigQuery/Ivy.EFCore.BigQuery.csproj --configuration Release --no-build --output ./artifacts /p:Version=$VERSION
dotnet pack src/Ivy.EFCore.BigQuery.NTS/Ivy.EFCore.BigQuery.NTS.csproj --configuration Release --no-build --output ./artifacts /p:Version=$VERSION
- name: List packages
run: ls -la ./artifacts/
- name: Sign NuGet packages
uses: sslcom/esigner-codesign@develop
with:
command: batch_sign
username: ${{ secrets.SSL_COM_USERNAME }}
password: ${{ secrets.SSL_COM_PASSWORD }}
credential_id: ${{ secrets.SSL_COM_CREDENTIAL_ID }}
totp_secret: ${{ secrets.SSL_COM_TOTP_SECRET }}
dir_path: ./artifacts
output_path: ./artifacts
- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source ${{ env.NUGET_SOURCE }} --skip-duplicate