Upload Server JAR #7
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
| name: Upload Server JAR | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version tag for this JAR (e.g., 1.0.0, beta-1)' | |
| required: true | |
| type: string | |
| jobs: | |
| create-upload-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Create draft release for JAR upload | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: jar-${{ inputs.version }} | |
| release_name: Server JAR - ${{ inputs.version }} | |
| body: | | |
| ## Upload Instructions | |
| 1. Edit this release | |
| 2. Upload the `HytaleServer.jar` file as a release asset | |
| 3. Publish the release (or keep as draft) | |
| 4. Run the "Extract Hytale Packets" workflow with: | |
| - Version: `${{ inputs.version }}` | |
| - JAR URL: Use the direct download URL of the uploaded JAR | |
| ### Getting the JAR URL | |
| After uploading, the URL format will be: | |
| ``` | |
| https://github.com/${{ github.repository }}/releases/download/jar-${{ inputs.version }}/HytaleServer.jar | |
| ``` | |
| draft: true | |
| prerelease: true | |
| - name: Output instructions | |
| run: | | |
| echo "## Next Steps" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "1. Go to the [draft release](${{ steps.create_release.outputs.html_url }})" >> $GITHUB_STEP_SUMMARY | |
| echo "2. Upload your \`HytaleServer.jar\` file" >> $GITHUB_STEP_SUMMARY | |
| echo "3. Publish the release" >> $GITHUB_STEP_SUMMARY | |
| echo "4. Run the **Extract Hytale Packets** workflow with:" >> $GITHUB_STEP_SUMMARY | |
| echo " - Version: \`${{ inputs.version }}\`" >> $GITHUB_STEP_SUMMARY | |
| echo " - JAR URL: \`https://github.com/${{ github.repository }}/releases/download/jar-${{ inputs.version }}/HytaleServer.jar\`" >> $GITHUB_STEP_SUMMARY |