1
+ name : Test Publish Action
2
+
3
+ on :
4
+ push :
5
+ tags : [ 'v1', 'v1-test' ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+
11
+ build_artifacts :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout prs-rs Repository
15
+ uses : actions/checkout@v4
16
+ with :
17
+ repository : Sewer56/prs-rs
18
+ ref : d08599ed5473616f57d57a0966939e1a5dbda9b4
19
+
20
+ - name : Build Rust C Library
21
+ uses : Reloaded-Project/devops-rust-lightweight-binary@v1
22
+ with :
23
+ crate-name : prs-rs
24
+ target : x86_64-unknown-linux-gnu
25
+ use-pgo : false
26
+ use-cross : false
27
+ features : " c-exports"
28
+ build-library : true
29
+ upload-artifacts : true
30
+
31
+ - name : Build .NET Library
32
+ uses : Reloaded-Project/devops-rust-c-library-to-dotnet@v1
33
+ with :
34
+ csharp-project-path : bindings/csharp
35
+
36
+ test_publish_action :
37
+ needs : build_artifacts
38
+ runs-on : ubuntu-latest
39
+ steps :
40
+ - name : Checkout prs-rs Repository
41
+ uses : actions/checkout@v4
42
+ with :
43
+ repository : Sewer56/prs-rs
44
+ ref : d08599ed5473616f57d57a0966939e1a5dbda9b4
45
+
46
+ - name : Download artifacts
47
+ uses : actions/download-artifact@v4
48
+ with :
49
+ path : artifacts
50
+
51
+ - name : Test Publish Action
52
+ uses : Reloaded-Project/ devops-publish-action@v1-test
53
+ with :
54
+ crates-io-token : ${{ secrets.CRATES_IO_TOKEN }}
55
+ additional-publish-params : --dry-run
56
+ create-release : false
57
+
58
+ - name : Verify NuGet packages
59
+ run : |
60
+ if ls artifacts/**/*.nupkg 1> /dev/null 2>&1; then
61
+ echo "NuGet packages found"
62
+ else
63
+ echo "No NuGet packages found"
64
+ exit 1
65
+ fi
66
+
67
+ if ls artifacts/**/*.snupkg 1> /dev/null 2>&1; then
68
+ echo "NuGet symbol packages found"
69
+ else
70
+ echo "No NuGet symbol packages found"
71
+ exit 1
72
+ fi
0 commit comments