Skip to content

Commit 36968de

Browse files
committed
feat(workflows): enhance nightly build process with Mythic Marketplace integration
- Add environment variable to check for Mythic release credentials. - Implement step to publish nightly builds to Mythic Marketplace if conditions are met. - Include changelog and versioning details in the release process. - Add summary output for successful releases to GitHub step summary.
1 parent 97d399f commit 36968de

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎.github/workflows/nightly.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ permissions:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
env:
15+
HAS_MYTHIC_RELEASE: ${{ secrets.MYTHIC_PRODUCT_ID != '' && secrets.MYTHIC_RELEASE_TOKEN != '' }}
1416

1517
steps:
1618
- name: Checkout
@@ -184,3 +186,31 @@ jobs:
184186
-H "User-Agent: MythicalSystems/MythicSkywars/${{ steps.version.outputs.version }} (github-actions)" \
185187
-d "$PAYLOAD" \
186188
--fail-with-body
189+
190+
- name: Publish nightly to Mythic Marketplace
191+
id: mythic_publish
192+
if: env.HAS_MYTHIC_RELEASE == 'true'
193+
uses: MythicalLTD/.github/actions/publish-release@v1
194+
with:
195+
product_id: ${{ secrets.MYTHIC_PRODUCT_ID }}
196+
environment: production
197+
version: ${{ steps.version.outputs.version }}
198+
changelog: |
199+
Nightly build — may be unstable. Prefer release builds for production.
200+
201+
Commit: ${{ github.sha }}
202+
Branch: ${{ github.ref_name }}
203+
${{ github.event.head_commit.message }}
204+
file_path: target/MythicSkywars-${{ steps.version.outputs.version }}.jar
205+
title: MythicSkywars Nightly #${{ github.run_number }} (${{ steps.version.outputs.version }})
206+
release_token: ${{ secrets.MYTHIC_RELEASE_TOKEN }}
207+
208+
- name: Mythic Marketplace summary
209+
if: steps.mythic_publish.outcome == 'success'
210+
shell: bash
211+
run: |
212+
{
213+
echo "### Mythic Marketplace (nightly)"
214+
echo "| Version | \`${{ steps.version.outputs.version }}\` |"
215+
echo "| Release | \`${{ steps.mythic_publish.outputs.release_url }}\` |"
216+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)