Skip to content

Commit 1e3abab

Browse files
committed
Fix auto-release: create unique releases instead of overwriting latest
1 parent ecfca48 commit 1e3abab

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

.github/workflows/build-and-release.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,21 +159,37 @@ jobs:
159159
id: commit_count
160160
run: echo "COUNT=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
161161

162-
- name: Delete existing latest release
163-
continue-on-error: true
164-
run: |
165-
gh release delete latest --yes --cleanup-tag
166-
env:
167-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162+
- name: Get short SHA
163+
id: sha
164+
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
168165

169-
- name: Create latest release
166+
- name: Create development release
170167
id: create_release
171168
uses: actions/create-release@v1
172169
env:
173170
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174171
with:
175-
tag_name: latest
176-
release_name: "Development Build (${{ steps.date.outputs.DATE }}-${{ steps.commit_count.outputs.COUNT }})"
172+
tag_name: dev-${{ steps.date.outputs.DATE }}-build${{ steps.commit_count.outputs.COUNT }}
173+
release_name: "Development Build v${{ steps.date.outputs.DATE }}-build${{ steps.commit_count.outputs.COUNT }}"
174+
body: |
175+
## 🚧 Development Build
176+
177+
**Version:** ${{ steps.date.outputs.DATE }}-build${{ steps.commit_count.outputs.COUNT }}
178+
**Commit:** ${{ steps.sha.outputs.SHORT_SHA }}
179+
**Branch:** ${{ github.ref_name }}
180+
181+
### 📦 Downloads
182+
- **Paper/Spigot**: NetworkDataAPI-Paper-${{ steps.date.outputs.DATE }}-${{ steps.commit_count.outputs.COUNT }}.jar
183+
- **BungeeCord**: NetworkDataAPI-Bungee-${{ steps.date.outputs.DATE }}-${{ steps.commit_count.outputs.COUNT }}.jar
184+
185+
### ⚠️ Note
186+
This is an automated development build. For stable releases, use tagged versions.
187+
188+
### 🚀 Installation
189+
1. Download the appropriate JAR for your server type
190+
2. Place in `plugins/` folder
191+
3. Configure MongoDB in `plugins/NetworkDataAPI/config.yml`
192+
4. Restart server
177193
draft: false
178194
prerelease: true
179195

0 commit comments

Comments
 (0)