Skip to content

Commit 21f4e46

Browse files
committed
Initial Version
1 parent 87ef72e commit 21f4e46

File tree

4 files changed

+206
-748
lines changed

4 files changed

+206
-748
lines changed

.github/workflows/test-build-workflow.yml

Lines changed: 0 additions & 315 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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: Download artifacts
41+
uses: actions/download-artifact@v4
42+
with:
43+
path: artifacts
44+
45+
- name: Checkout prs-rs Repository
46+
uses: actions/checkout@v4
47+
with:
48+
repository: Sewer56/prs-rs
49+
ref: d08599ed5473616f57d57a0966939e1a5dbda9b4
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+
checkout-current-repo: false
58+
59+
- name: Verify NuGet packages
60+
run: |
61+
nupkg_files=$(find artifacts -type f -name "*.nupkg")
62+
snupkg_files=$(find artifacts -type f -name "*.snupkg")
63+
64+
if [ -n "$nupkg_files" ] && [ -n "$snupkg_files" ]; then
65+
echo "Both nupkg and snupkg files found."
66+
else
67+
if [ -z "$nupkg_files" ]; then
68+
echo "No nupkg file found."
69+
fi
70+
if [ -z "$snupkg_files" ]; then
71+
echo "No snupkg file found."
72+
fi
73+
exit 1
74+
fi

0 commit comments

Comments
 (0)