feat(release): add Forgejo release step to GitHub Actions pipeline
Some checks are pending
Release Pipeline / Bump Version & Create Tag (push) Waiting to run
Release Pipeline / Package Linux (DEB) (push) Blocked by required conditions
Release Pipeline / Package macOS (DMG) (push) Blocked by required conditions
Release Pipeline / Package Windows (MSI) (push) Blocked by required conditions
Release Pipeline / Create GitHub & Forgejo Releases (push) Blocked by required conditions
Some checks are pending
Release Pipeline / Bump Version & Create Tag (push) Waiting to run
Release Pipeline / Package Linux (DEB) (push) Blocked by required conditions
Release Pipeline / Package macOS (DMG) (push) Blocked by required conditions
Release Pipeline / Package Windows (MSI) (push) Blocked by required conditions
Release Pipeline / Create GitHub & Forgejo Releases (push) Blocked by required conditions
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
parent
101f80a3d5
commit
ccfb187601
2 changed files with 68 additions and 2 deletions
67
.github/workflows/release.yml
vendored
67
.github/workflows/release.yml
vendored
|
|
@ -99,7 +99,7 @@ jobs:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
name: Create GitHub Release
|
name: Create GitHub & Forgejo Releases
|
||||||
needs:
|
needs:
|
||||||
- bump-version
|
- bump-version
|
||||||
- package
|
- package
|
||||||
|
|
@ -140,3 +140,68 @@ jobs:
|
||||||
gh release create "${RELEASE_TAG}" dist/* \
|
gh release create "${RELEASE_TAG}" dist/* \
|
||||||
--title "WoW Backup ${RELEASE_TAG}" \
|
--title "WoW Backup ${RELEASE_TAG}" \
|
||||||
--notes "${RELEASE_BODY}"
|
--notes "${RELEASE_BODY}"
|
||||||
|
|
||||||
|
- name: Publish Forgejo Release
|
||||||
|
env:
|
||||||
|
FORGEJO_PAT: ${{ secrets.FORGEJO_PAT }}
|
||||||
|
RELEASE_TAG: ${{ needs.bump-version.outputs.tag }}
|
||||||
|
RELEASE_VERSION: ${{ needs.bump-version.outputs.version }}
|
||||||
|
run: |
|
||||||
|
RELEASE_BODY="### WoW Backup ${RELEASE_TAG}
|
||||||
|
|
||||||
|
Automated release build for **WoW Backup v${RELEASE_VERSION}**.
|
||||||
|
|
||||||
|
#### Available Packages
|
||||||
|
- **macOS**: \`.dmg\` installer (Apple Silicon & Intel)
|
||||||
|
- **Windows**: \`.msi\` Windows Installer
|
||||||
|
- **Linux**: \`.deb\` package (Debian / Ubuntu)
|
||||||
|
|
||||||
|
---
|
||||||
|
For detailed setup and installation notes, please refer to [INSTALL.md](https://git.asarius.site/rukira/wow-backup/src/tag/${RELEASE_TAG}/INSTALL.md)."
|
||||||
|
|
||||||
|
echo "Publishing release ${RELEASE_TAG} to Forgejo (git.asarius.site)..."
|
||||||
|
|
||||||
|
PAYLOAD=$(jq -n \
|
||||||
|
--arg tag "$RELEASE_TAG" \
|
||||||
|
--arg name "WoW Backup ${RELEASE_TAG}" \
|
||||||
|
--arg body "$RELEASE_BODY" \
|
||||||
|
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')
|
||||||
|
|
||||||
|
CREATE_RESPONSE=$(curl -sS -X POST \
|
||||||
|
"https://git.asarius.site/api/v1/repos/rukira/wow-backup/releases" \
|
||||||
|
-H "Authorization: token ${FORGEJO_PAT}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Accept: application/json" \
|
||||||
|
-d "$PAYLOAD" || true)
|
||||||
|
|
||||||
|
RELEASE_ID=$(echo "$CREATE_RESPONSE" | jq -r '.id // empty')
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then
|
||||||
|
echo "Release creation did not return an ID, checking if release already exists for tag ${RELEASE_TAG}..."
|
||||||
|
GET_RESPONSE=$(curl -sS -X GET \
|
||||||
|
"https://git.asarius.site/api/v1/repos/rukira/wow-backup/releases/tags/${RELEASE_TAG}" \
|
||||||
|
-H "Authorization: token ${FORGEJO_PAT}" \
|
||||||
|
-H "Accept: application/json" || true)
|
||||||
|
RELEASE_ID=$(echo "$GET_RESPONSE" | jq -r '.id // empty')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then
|
||||||
|
echo "::error::Failed to create or find Forgejo release."
|
||||||
|
echo "Response: $CREATE_RESPONSE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Forgejo Release ID: ${RELEASE_ID}"
|
||||||
|
|
||||||
|
for file in dist/*; do
|
||||||
|
[ -f "$file" ] || continue
|
||||||
|
filename=$(basename "$file")
|
||||||
|
echo "Uploading asset ${filename} to Forgejo release ${RELEASE_ID}..."
|
||||||
|
curl -sS --fail-with-body -X POST \
|
||||||
|
"https://git.asarius.site/api/v1/repos/rukira/wow-backup/releases/${RELEASE_ID}/assets?name=${filename}" \
|
||||||
|
-H "Authorization: token ${FORGEJO_PAT}" \
|
||||||
|
-H "Accept: application/json" \
|
||||||
|
-F "attachment=@${file}"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Forgejo release published successfully."
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
**Status:** ✅ **Completed**
|
**Status:** ✅ **Completed**
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
Automated multi-platform packaging and release pipeline for WoW Backup using GitHub Actions. Whenever changes are merged/pushed to the `main` branch, the pipeline calculates the next release version and tag, compiles native distributables for macOS, Windows, and Linux, and attaches all packaged binaries to a published GitHub Release.
|
Automated multi-platform packaging and release pipeline for WoW Backup using GitHub Actions. Whenever changes are merged/pushed to the `main` branch, the pipeline calculates the next release version and tag, compiles native distributables for macOS, Windows, and Linux, and attaches all packaged binaries to a published GitHub Release as well as a published Forgejo Release on `git.asarius.site` (`rukira/wow-backup`).
|
||||||
|
|
||||||
## Deliverables
|
## Deliverables
|
||||||
1. **Dynamic Versioning in Gradle**:
|
1. **Dynamic Versioning in Gradle**:
|
||||||
|
|
@ -13,6 +13,7 @@ Automated multi-platform packaging and release pipeline for WoW Backup using Git
|
||||||
- Automated semantic patch version computation and git tagging on push to `main` and `workflow_dispatch`.
|
- Automated semantic patch version computation and git tagging on push to `main` and `workflow_dispatch`.
|
||||||
- Parallel runner matrix (`macos-latest`, `windows-latest`, `ubuntu-latest`) packaging `.dmg`, `.msi`, and `.deb`.
|
- Parallel runner matrix (`macos-latest`, `windows-latest`, `ubuntu-latest`) packaging `.dmg`, `.msi`, and `.deb`.
|
||||||
- Automated GitHub Release creation with attached artifacts and release notes.
|
- Automated GitHub Release creation with attached artifacts and release notes.
|
||||||
|
- Automated Forgejo Release creation on `git.asarius.site` (`rukira/wow-backup`) with attached distribution packages using `FORGEJO_PAT`.
|
||||||
3. **Installation Guide (`INSTALL.md`)**:
|
3. **Installation Guide (`INSTALL.md`)**:
|
||||||
- Detailed user installation guide for macOS (Gatekeeper bypass), Windows (SmartScreen bypass), and Linux (APT/DPKG).
|
- Detailed user installation guide for macOS (Gatekeeper bypass), Windows (SmartScreen bypass), and Linux (APT/DPKG).
|
||||||
- Linked directly from `README.md`.
|
- Linked directly from `README.md`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue