-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.58 KB
/
test-publish-workflow.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
name: Test Publish Action
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout prs-rs Repository
uses: actions/checkout@v4
with:
repository: Sewer56/prs-rs
ref: d08599ed5473616f57d57a0966939e1a5dbda9b4
- name: Build Rust C Library
uses: Reloaded-Project/devops-rust-lightweight-binary@v1
with:
crate-name: prs-rs
target: x86_64-unknown-linux-gnu
use-pgo: true
use-cross: false
features: "c-exports"
build-library: true
upload-artifacts: true
- name: Build .NET Library
uses: Reloaded-Project/devops-rust-c-library-to-dotnet@v1
with:
csharp-project-path: bindings/csharp
test_publish_action:
needs: build_artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Test Publish Action
uses: ./
with:
crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}
additional-publish-params: --dry-run
- name: Verify NuGet packages
run: |
if ls artifacts/**/*.nupkg 1> /dev/null 2>&1; then
echo "NuGet packages found"
else
echo "No NuGet packages found"
exit 1
fi
if ls artifacts/**/*.snupkg 1> /dev/null 2>&1; then
echo "NuGet symbol packages found"
else
echo "No NuGet symbol packages found"
exit 1
fi