Skip to content

Commit e3507f6

Browse files
Update split.yml
1 parent 9f91d3a commit e3507f6

1 file changed

Lines changed: 36 additions & 36 deletions

File tree

.github/workflows/split.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -167,44 +167,44 @@ jobs:
167167
user_name: "Moox Bot"
168168
user_email: "bot@moox.org"
169169

170-
# - name: Create GitHub Release for split package
171-
# run: |
172-
# PACKAGE="${{ matrix.package }}"
173-
# VERSION="${{ steps.version.outputs.final-version }}"
174-
# IS_PRERELEASE="${{ steps.version.outputs.is-prerelease }}"
175-
# STABILITY="${{ steps.version.outputs.stability }}"
176-
# RELEASE_BODY=$(echo '${{ github.event.inputs.packages }}' | jq -r ".\"$PACKAGE\".\"release-message\" // [] | .[:10] | join(\"\\n\")")
170+
- name: Create GitHub Release for split package
171+
run: |
172+
PACKAGE="${{ matrix.package }}"
173+
VERSION="${{ steps.version.outputs.final-version }}"
174+
IS_PRERELEASE="${{ steps.version.outputs.is-prerelease }}"
175+
STABILITY="${{ steps.version.outputs.stability }}"
176+
RELEASE_BODY=$(echo '${{ github.event.inputs.packages }}' | jq -r ".\"$PACKAGE\".\"release-message\" // [] | .[:10] | join(\"\\n\")")
177177
178-
# echo "Package: $PACKAGE"
179-
# echo "Version: $VERSION"
180-
# echo "Stability: $STABILITY"
181-
# echo "Is prerelease: $IS_PRERELEASE"
182-
# echo "Release notes: $RELEASE_BODY"
178+
echo "Package: $PACKAGE"
179+
echo "Version: $VERSION"
180+
echo "Stability: $STABILITY"
181+
echo "Is prerelease: $IS_PRERELEASE"
182+
echo "Release notes: $RELEASE_BODY"
183183
184-
# # Only create release if stability is not 'dev'
185-
# if [ "$STABILITY" != "dev" ]; then
186-
# echo "✅ Creating release for $PACKAGE (stability: $STABILITY)"
184+
# Only create release if stability is not 'dev'
185+
if [ "$STABILITY" != "dev" ]; then
186+
echo "✅ Creating release for $PACKAGE (stability: $STABILITY)"
187187
188-
# # Wait for tag propagation
189-
# sleep 10
188+
# Wait for tag propagation
189+
sleep 10
190190
191-
# if [ "$IS_PRERELEASE" = "true" ]; then
192-
# gh release create "$VERSION" \
193-
# --repo "mooxphp/$PACKAGE" \
194-
# --title "Release $VERSION" \
195-
# --notes "$RELEASE_BODY" \
196-
# --prerelease
197-
# else
198-
# gh release create "$VERSION" \
199-
# --repo "mooxphp/$PACKAGE" \
200-
# --title "Release $VERSION" \
201-
# --notes "$RELEASE_BODY"
202-
# fi
191+
if [ "$IS_PRERELEASE" = "true" ]; then
192+
gh release create "$VERSION" \
193+
--repo "mooxphp/$PACKAGE" \
194+
--title "Release $VERSION" \
195+
--notes "$RELEASE_BODY" \
196+
--prerelease
197+
else
198+
gh release create "$VERSION" \
199+
--repo "mooxphp/$PACKAGE" \
200+
--title "Release $VERSION" \
201+
--notes "$RELEASE_BODY"
202+
fi
203203
204-
# echo "✅ Release created successfully"
205-
# else
206-
# echo "⏭️ Skipping release for $PACKAGE (stability: dev)"
207-
# echo " Package was split to repository but no release was created"
208-
# fi
209-
# env:
210-
# GH_TOKEN: ${{ github.event.inputs.user_token != '' && github.event.inputs.user_token || secrets.BOT }}
204+
echo "✅ Release created successfully"
205+
else
206+
echo "⏭️ Skipping release for $PACKAGE (stability: dev)"
207+
echo " Package was split to repository but no release was created"
208+
fi
209+
env:
210+
GH_TOKEN: ${{ github.event.inputs.user_token != '' && github.event.inputs.user_token || secrets.BOT }}

0 commit comments

Comments
 (0)