Repository navigation
61 lines (47 loc) · 1.62 KB
/
Copy pathnuget-preview.yml
File metadata and controls
61 lines (47 loc) · 1.62 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
name: NuGet Preview Release
on:
schedule:
- cron: "5 4 3 */1 *" # once a month, at 4:05 on 3rd
workflow_dispatch:
jobs:
release:
name: Release Preview
runs-on: ubuntu-latest
environment: NuGet
timeout-minutes: 30
env:
PYTHONNET_SHUTDOWN_MODE: Normal
steps:
- name: Get Date
run: |
echo "DATE_VER=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v7
- name: Setup just
uses: extractions/setup-just@v4
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'
- name: Set up Python 3.11
uses: astral-sh/setup-uv@v7
with:
python-version: cpython-3.11
cache-python: true
activate-environment: true
enable-cache: true
- name: Install dependencies
run: uv sync --managed-python
- name: Set Python DLL path
run: |
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
- name: Python Tests
run: just test-python
- name: Embedding tests
run: just test-embed any-ubuntu
- name: Pack
run: dotnet pack --configuration Release --version-suffix preview${{env.DATE_VER}} --output "Release-Preview"
- name: Publish NuGet
run: |
dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_MONTHLY }} Release-Preview/*.nupkg
dotnet nuget push --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_MONTHLY }} Release-Preview/*.snupkg