ci: versioning

This commit is contained in:
/home/neo 2026-05-03 18:59:45 +03:00 committed by GitHub
parent 16f0495ac2
commit 32eb37a5e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,8 +2,8 @@ name: Stable Release
on: on:
push: push:
branches: paths:
- main - 'BUMP' #neo: this is a file. edit it. contains version number
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@ -221,33 +221,21 @@ jobs:
artifacts/neoLegacyServerWindows64.zip artifacts/neoLegacyServerWindows64.zip
artifacts/neoLegacyServerWindows64-FourKit.zip artifacts/neoLegacyServerWindows64-FourKit.zip
- name: Get short SHA
id: sha
run: echo "short=$(echo '${{ github.sha }}' | cut -c1-7)" >> "$GITHUB_OUTPUT"
- name: Delete old release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release delete Stable-Dedicated-Server --yes || true
- name: Delete old tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh api repos/${{ github.repository }}/git/refs/tags/Stable-Dedicated-Server --method DELETE || true
- name: Create tag - name: Create tag
run: | run: |
VERSION=v$(cat BUMP)
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -f Stable-Dedicated-Server -m "Stable server release ${{ steps.sha.outputs.short }}" git tag -f $VERSION-Dedicated-Server -m "$VERSION server"
git push origin Stable-Dedicated-Server --force git push origin $VERSION-Dedicated-Server --force
- name: Create release - name: Create release
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
gh release create Stable-Dedicated-Server artifacts/* \ VERSION=v$(cat BUMP)
--title "Server: ${{ steps.sha.outputs.short }}" \ gh release create $VERSION-Dedicated-Server artifacts/* \
--title "$(VERSION) Server" \
--notes "Dedicated Server runtime for Windows64. --notes "Dedicated Server runtime for Windows64.
Two flavours are attached: Two flavours are attached:
@ -278,26 +266,13 @@ jobs:
subject-path: | subject-path: |
artifacts/neoLegacyWindows64.zip artifacts/neoLegacyWindows64.zip
- name: Get short SHA
id: sha
run: echo "short=$(echo '${{ github.sha }}' | cut -c1-7)" >> "$GITHUB_OUTPUT"
- name: Delete old release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release delete Stable --yes || true
- name: Delete old tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh api repos/${{ github.repository }}/git/refs/tags/Stable --method DELETE || true
- name: Create tag - name: Create tag
run: | run: |
VERSION=v$(cat BUMP)
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -f Stable -m "Stable release ${{ steps.sha.outputs.short }}" git tag -f $VERSION -m "Stable release $VERSION"
git push origin Stable --force git push origin $VERSION --force
- name: Write release notes - name: Write release notes
run: | run: |
@ -326,13 +301,15 @@ jobs:
- Local Port: `25565` - Local Port: `25565`
- Proxy Protocol: `None` - Proxy Protocol: `None`
- After creating your tunnel, navigate to the "Tunnels" main page. You'll see the IP address and port for your tunnel. This is what your friends will input when adding your server in order to join your online game! - After creating your tunnel, navigate to the "Tunnels" main page. You'll see the IP address and port for your tunnel. This is what your friends will input when adding your server in order to join your online game!
NOTES
- name: Create release - name: Create release
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
gh release create Stable artifacts/* \ VERSION=v$(cat BUMP)
--title "Client: ${{ steps.sha.outputs.short }}" \ gh release create $VERSION artifacts/* \
--title "$VERSION" \
--notes-file notes.md --notes-file notes.md
cleanup: cleanup: