Skip to content

Commit b0d2fbd

Browse files
authored
Create draft GH release + safer releases (#78)
1 parent e94b5cb commit b0d2fbd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
shell: bash
3838
run: |
3939
COMMON_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Common/CHANGELOG.md)
40+
if [[ -z "$COMMON_VERSION" ]]; then
41+
echo "Error: Invalid version found in PowerSync.Common/CHANGELOG.md. Expected format: '## x.x.x'"
42+
exit 1
43+
fi
4044
echo "Detected Version: $COMMON_VERSION"
4145
echo "VERSION=$COMMON_VERSION" >> $GITHUB_ENV
4246
echo "COMMON_VERSION=$COMMON_VERSION" >> $GITHUB_ENV
@@ -53,6 +57,10 @@ jobs:
5357
shell: bash
5458
run: |
5559
MAUI_VERSION=$(awk '/^## [0-9]+\.[0-9]+\.[0-9]+/ {print $2; exit}' PowerSync/PowerSync.Maui/CHANGELOG.md)
60+
if [[ -z "$MAUI_VERSION" ]]; then
61+
echo "Error: Invalid version found in PowerSync.Maui/CHANGELOG.md. Expected format: '## x.x.x'"
62+
exit 1
63+
fi
5664
echo "Detected Version: $MAUI_VERSION"
5765
echo "VERSION=$MAUI_VERSION" >> $GITHUB_ENV
5866
echo "MAUI_VERSION=$MAUI_VERSION" >> $GITHUB_ENV
@@ -72,11 +80,13 @@ jobs:
7280
GH_TOKEN: ${{ github.token }}
7381
run: |
7482
gh release create "PowerSync.Common@${{ env.COMMON_VERSION }}" \
83+
--draft \
7584
--title "PowerSync.Common@${{ env.COMMON_VERSION }}" \
7685
--target main \
7786
--generate-notes \
7887
${{ github.workspace }}/output/PowerSync.Common*.nupkg
7988
gh release create "PowerSync.Maui@${{ env.MAUI_VERSION }}" \
89+
--draft \
8090
--title "PowerSync.Maui@${{ env.MAUI_VERSION }}" \
8191
--target main \
8292
--generate-notes \

0 commit comments

Comments
 (0)