Initial Version #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |