Create Dev Release #20
This file contains hidden or 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
# The version is pulled from the CHANGELOG.md file of the package. | |
# Add a `-dev.xxx` suffix to the version. Example: `0.0.1-dev.1` | |
name: Create Dev Release | |
on: workflow_dispatch | |
jobs: | |
dev-release: | |
name: Publish Dev Packages | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0' | |
- name: Download PowerSync extension | |
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: | | |
COMMON_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+-dev(\.[0-9]+)?$/ {print $2; exit}' PowerSync/PowerSync.Common/CHANGELOG.md) | |
echo "Detected Version: $COMMON_VERSION" | |
echo "VERSION=$COMMON_VERSION" >> $GITHUB_ENV | |
- name: Run Pack For Common | |
run: dotnet pack PowerSync/PowerSync.Common -c Release -o ${{ github.workspace }}/output | |
- name: Run Push For Common | |
run: dotnet nuget push ${{ github.workspace }}\output\PowerSync.Common*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} | |
- name: Extract MAUI Package Version from CHANGELOG.md | |
id: extract_maui_version | |
shell: bash | |
run: | | |
MAUI_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+-dev(\.[0-9]+)?$/ {print $2; exit}' PowerSync/PowerSync.Maui/CHANGELOG.md) | |
echo "Detected Version: $MAUI_VERSION" | |
echo "VERSION=$MAUI_VERSION" >> $GITHUB_ENV | |
- name: Run Pack For MAUI | |
run: dotnet pack PowerSync/PowerSync.Maui -c Release -o ${{ github.workspace }}/output | |
- name: Run Push For MAUI | |
run: dotnet nuget push ${{ github.workspace }}\output\PowerSync.Maui*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} |