mirror of
https://github.com/Dasemu/Transcriptarr.git
synced 2026-11-26 15:06:06 +00:00
feat(ci): create Gitea release on main bump and GitHub release on v* tags
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08148d90d0
commit
8846e2d95a
3 files changed
+36
-1
No files matched your search
@@ -71,3 +71,19 @@ jobs:
|
||||
git checkout development
|
||||
git merge --no-edit origin/main
|
||||
git push origin development
|
||||
|
||||
- name: Create Gitea release
|
||||
if: github.ref_name == 'main'
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
tag="v${{ steps.version.outputs.new }}"
|
||||
prev=$(git describe --tags --abbrev=0 --match 'v*' 2>/dev/null || true)
|
||||
if [ -n "$prev" ]; then range="$prev..HEAD"; else range="HEAD"; fi
|
||||
notes=$(git log "$range" --pretty='- %s' | grep -v 'chore(release)' || true)
|
||||
jq -n --arg tag "$tag" --arg sha "$(git rev-parse HEAD)" --arg body "$notes" \
|
||||
'{tag_name: $tag, target_commitish: $sha, name: $tag, body: $body}' > release.json
|
||||
curl -fsS -X POST \
|
||||
-H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
|
||||
-d @release.json \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Release
|
||||
|
||||
# Gitea creates the vX.Y.Z tag and release; this runs where that tag is mirrored.
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Create GitHub release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --generate-notes --verify-tag
|
||||
@@ -24,7 +24,7 @@ FastAPI backend under `backend/` (API routers in `backend/api`, core services in
|
||||
- No backend linter/formatter (ruff/black/flake8) and no automated test suite (pytest/vitest) are configured yet. Do not assume `npm run lint` passes — it has no config.
|
||||
- Single `frontend/package.json` version field; there is no root `package.json`/`pyproject.toml`, so the release workflow tracks the version in the root `VERSION` file.
|
||||
|
||||
- CI runs on both Gitea (`.gitea/workflows/ci.yml`) and GitHub (`.github/workflows/ci.yml`); keep them in sync. Versioning (`version.yml`) exists only under `.gitea/workflows/`.
|
||||
- CI runs on both Gitea (`.gitea/workflows/ci.yml`) and GitHub (`.github/workflows/ci.yml`); keep them in sync. Versioning and the Gitea release (`version.yml`) exist only under `.gitea/workflows/`; the GitHub release (`.github/workflows/release.yml`) is created when the `v*` tag reaches GitHub.
|
||||
|
||||
## Deployment
|
||||
Not yet documented here; no deployment workflow exists in this repo.
|
||||
|
||||
Reference in new issue
Block a user