Skip to content

Commit 94731a3

Browse files
committed
feat: add annotation events (Phase 7.2) and release preparation
- Implement annotation tap detection on iOS using PdfKit AnnotationHitNotification - Add AnnotationTappedEventArgs with PageIndex, AnnotationType, Contents, Bounds, Handled - Add AnnotationTapped event to IPdfView interface (iOS-only) - Wire up event handling in iOS handler - Declare Android event (non-functional due to library limitations) - Update sample app with annotation info display - Add GitHub Actions workflow for NuGet publishing with semantic versioning - Add MIT License - Clean obsolete development documentation - Create comprehensive professional README.md - Mark Phase 7.2 complete (all planned phases done)
1 parent 483592d commit 94731a3

22 files changed

Lines changed: 794 additions & 2743 deletions

.github/workflows/publish.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Build and Publish to NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
9+
env:
10+
DOTNET_VERSION: '9.0.x'
11+
CONFIGURATION: Release
12+
13+
jobs:
14+
build-and-publish:
15+
runs-on: macos-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: ${{ env.DOTNET_VERSION }}
27+
28+
- name: Install MAUI workloads
29+
run: dotnet workload install maui
30+
31+
- name: Get version from tag
32+
id: get_version
33+
run: |
34+
if [[ $GITHUB_REF == refs/tags/* ]]; then
35+
VERSION=${GITHUB_REF#refs/tags/v}
36+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
37+
echo "Building version: $VERSION"
38+
else
39+
VERSION="1.0.0-dev.${{ github.run_number }}"
40+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
41+
echo "Building dev version: $VERSION"
42+
fi
43+
44+
- name: Restore dependencies
45+
run: |
46+
dotnet restore src/MauiNativePdfView.Android.Binding/MauiNativePdfView.Android.Binding.csproj
47+
dotnet restore src/MauiNativePdfView/MauiNativePdfView.csproj
48+
49+
- name: Build Android Binding
50+
run: |
51+
dotnet build src/MauiNativePdfView.Android.Binding/MauiNativePdfView.Android.Binding.csproj \
52+
--configuration ${{ env.CONFIGURATION }} \
53+
--no-restore \
54+
/p:Version=${{ steps.get_version.outputs.VERSION }}
55+
56+
- name: Build Main Library
57+
run: |
58+
dotnet build src/MauiNativePdfView/MauiNativePdfView.csproj \
59+
--configuration ${{ env.CONFIGURATION }} \
60+
--no-restore \
61+
/p:Version=${{ steps.get_version.outputs.VERSION }}
62+
63+
- name: Pack Android Binding
64+
run: |
65+
dotnet pack src/MauiNativePdfView.Android.Binding/MauiNativePdfView.Android.Binding.csproj \
66+
--configuration ${{ env.CONFIGURATION }} \
67+
--no-build \
68+
--output ./artifacts \
69+
/p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
70+
71+
- name: Pack Main Library
72+
run: |
73+
dotnet pack src/MauiNativePdfView/MauiNativePdfView.csproj \
74+
--configuration ${{ env.CONFIGURATION }} \
75+
--no-build \
76+
--output ./artifacts \
77+
/p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
78+
79+
- name: Upload artifacts
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: nuget-packages
83+
path: ./artifacts/*.nupkg
84+
85+
- name: Publish to NuGet
86+
if: startsWith(github.ref, 'refs/tags/')
87+
run: |
88+
dotnet nuget push ./artifacts/*.nupkg \
89+
--api-key ${{ secrets.NUGET_API_KEY }} \
90+
--source https://api.nuget.org/v3/index.json \
91+
--skip-duplicate
92+
93+
- name: Create GitHub Release
94+
if: startsWith(github.ref, 'refs/tags/')
95+
uses: softprops/action-gh-release@v1
96+
with:
97+
files: ./artifacts/*.nupkg
98+
generate_release_notes: true
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)