Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: "8.0.x"

- name: Install MAUI Workloads
run: dotnet workload restore

- name: Download PowerSync extension
run: dotnet run --project Tools/Setup
run: dotnet run --project Tools/Setup

- name: Restore dependencies
run: dotnet restore

- name: Extract Common Package Version from CHANGELOG.md
id: extract_version
shell: bash
run: |
VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Common/CHANGELOG.md)
echo "Detected Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "COMMON_VERSION=$VERSION" >> $GITHUB_ENV

- name: Run Pack for Common
run: dotnet pack PowerSync/PowerSync.Common -c Release -o ${{ github.workspace }}/output
Expand All @@ -50,8 +50,8 @@ jobs:
run: |
MAUI_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Maui/CHANGELOG.md)
echo "Detected Version: $MAUI_VERSION"
echo "VERSION=$MAUI_VERSION" >> $GITHUB_ENV
echo "MAUI_VERSION=$MAUI_VERSION" >> $GITHUB_ENV

- name: Build MAUI Project
run: dotnet build PowerSync/PowerSync.Maui -c Release

Expand All @@ -60,4 +60,21 @@ jobs:

- name: Run Push For MAUI
continue-on-error: true
run: dotnet nuget push ${{ github.workspace }}/output/PowerSync.Maui*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ${{ github.workspace }}/output/PowerSync.Maui*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}

- name: Create GitHub Releases
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "PowerSync.Common@${{ env.COMMON_VERSION }}" \
--prerelease \
--title "PowerSync.Common@${{ env.COMMON_VERSION }}" \
--target main \
--generate-notes \
${{ github.workspace }}/output/PowerSync.Common*.nupkg
gh release create "PowerSync.Maui@${{ env.MAUI_VERSION }}" \
--prerelease \
--title "PowerSync.Maui@${{ env.MAUI_VERSION }}" \
--target main \
--generate-notes \
${{ github.workspace }}/output/PowerSync.Maui*.nupkg
Loading