@@ -18,24 +18,25 @@ jobs:
1818 - name : Setup .NET SDK
1919 uses : actions/setup-dotnet@v4
2020 with :
21- dotnet-version : ' 8.0.x'
21+ dotnet-version : " 8.0.x"
2222
2323 - name : Install MAUI Workloads
2424 run : dotnet workload restore
2525
2626 - name : Download PowerSync extension
27- run : dotnet run --project Tools/Setup
27+ run : dotnet run --project Tools/Setup
2828
2929 - name : Restore dependencies
3030 run : dotnet restore
31-
31+
3232 - name : Extract Common Package Version from CHANGELOG.md
3333 id : extract_version
3434 shell : bash
3535 run : |
36- VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Common/CHANGELOG.md)
37- echo "Detected Version: $VERSION"
38- echo "VERSION=$VERSION" >> $GITHUB_ENV
36+ COMMON_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Common/CHANGELOG.md)
37+ echo "Detected Version: $COMMON_VERSION"
38+ echo "VERSION=$COMMON_VERSION" >> $GITHUB_ENV
39+ echo "COMMON_VERSION=$COMMON_VERSION" >> $GITHUB_ENV
3940
4041 - name : Run Pack for Common
4142 run : dotnet pack PowerSync/PowerSync.Common -c Release -o ${{ github.workspace }}/output
5152 MAUI_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Maui/CHANGELOG.md)
5253 echo "Detected Version: $MAUI_VERSION"
5354 echo "VERSION=$MAUI_VERSION" >> $GITHUB_ENV
54-
55+ echo "MAUI_VERSION=$MAUI_VERSION" >> $GITHUB_ENV
56+
5557 - name : Build MAUI Project
5658 run : dotnet build PowerSync/PowerSync.Maui -c Release
5759
6062
6163 - name : Run Push For MAUI
6264 continue-on-error : true
63- run : dotnet nuget push ${{ github.workspace }}/output/PowerSync.Maui*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
65+ run : dotnet nuget push ${{ github.workspace }}/output/PowerSync.Maui*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
66+
67+ - name : Create GitHub Releases
68+ env :
69+ GH_TOKEN : ${{ github.token }}
70+ run : |
71+ gh release create "PowerSync.Common@${{ env.COMMON_VERSION }}" \
72+ --prerelease \
73+ --title "PowerSync.Common@${{ env.COMMON_VERSION }}" \
74+ --target main \
75+ --generate-notes \
76+ ${{ github.workspace }}/output/PowerSync.Common*.nupkg
77+ gh release create "PowerSync.Maui@${{ env.MAUI_VERSION }}" \
78+ --prerelease \
79+ --title "PowerSync.Maui@${{ env.MAUI_VERSION }}" \
80+ --target main \
81+ --generate-notes \
82+ ${{ github.workspace }}/output/PowerSync.Maui*.nupkg
0 commit comments