Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 879f3b217d | |||
| 07cb1ad8ef | |||
| 2979b5d781 | |||
| 14736169d4 | |||
| f2e4d78fd9 |
@@ -52,23 +52,35 @@ jobs:
|
|||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
TAG: ${{ github.ref_name }}
|
TAG: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
# Create the release
|
# Gitea may not have finished processing the tag ref by the time the
|
||||||
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
|
# workflow runner starts, so retry a few times before giving up.
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
RELEASE_ID=""
|
||||||
-H "Content-Type: application/json" \
|
for attempt in 1 2 3 4 5; do
|
||||||
"${GITEA_URL}/api/v1/repos/${REPO}/releases" \
|
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
|
||||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}")
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
"${GITEA_URL}/api/v1/repos/${REPO}/releases" \
|
||||||
|
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}")
|
||||||
|
|
||||||
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
||||||
BODY=$(echo "$RESPONSE" | head -1)
|
BODY=$(echo "$RESPONSE" | head -1)
|
||||||
|
|
||||||
if [ "$HTTP_CODE" -ne 201 ]; then
|
if [ "$HTTP_CODE" -eq 201 ]; then
|
||||||
echo "Failed to create release (HTTP $HTTP_CODE): $BODY"
|
RELEASE_ID=$(echo "$BODY" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Attempt $attempt failed (HTTP $HTTP_CODE): $BODY"
|
||||||
|
if [ "$attempt" -lt 5 ]; then
|
||||||
|
sleep $((attempt * 5))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ]; then
|
||||||
|
echo "Failed to create release after 5 attempts"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE_ID=$(echo "$BODY" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
||||||
|
|
||||||
# Upload binary asset
|
# Upload binary asset
|
||||||
BINARY="mikebase-${TAG}-x86_64-linux"
|
BINARY="mikebase-${TAG}-x86_64-linux"
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
@@ -92,7 +104,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: git.open3dlab.com
|
registry: git.open3dlab.com
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract metadata
|
||||||
id: meta
|
id: meta
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
name: Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
name: Build and push Docker image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to Docker registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.DOCKER_REGISTRY }}
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Extract metadata
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ vars.DOCKER_REGISTRY }}/${{ vars.DOCKER_IMAGE }}
|
|
||||||
tags: |
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.2.4] - 2026-04-11
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Gitea release workflow: remove `target_commitish` from release creation API
|
||||||
|
call to fix 409 conflict when creating releases for existing tags.
|
||||||
|
|
||||||
|
## [0.2.3] - 2026-04-11
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Gitea release workflow: retry release creation with backoff to handle timing
|
||||||
|
between tag push and tag availability in the API.
|
||||||
|
|
||||||
|
## [0.2.2] - 2026-04-09
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Updated Gitea container registry token in CI.
|
||||||
|
|
||||||
|
## [0.2.1] - 2026-04-09
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Deleted old GitHub Actions workflows (superseded by Gitea workflows).
|
||||||
|
|
||||||
|
## [0.2.0] - 2026-04-09
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Emotes listing HTML page at `GET /` with styled table (accent colors, drop
|
||||||
|
shadow, glow effects).
|
||||||
|
- `GET /` health check endpoint (returns 200 OK).
|
||||||
|
- Dockerfile and Docker build/push workflow targeting the Gitea container
|
||||||
|
registry.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Error handling added to the client-side emotes fetch call on the HTML page.
|
||||||
|
|
||||||
|
## [0.1.0] - 2026-03-18
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Rust/Axum HTTP server with SQLite and PostgreSQL support via `sqlx::AnyPool`.
|
||||||
|
- `EmoteRow` DB model and `EmoteResponse` JSON API response type.
|
||||||
|
- `POST /emotes` — create emote (multipart: `name`, `alias?`, `file`).
|
||||||
|
- `PUT /emotes/{uuid}` — update emote metadata.
|
||||||
|
- `DELETE /emotes/{uuid}` — delete emote from DB and S3.
|
||||||
|
- `GET /json` — list all emotes as JSON.
|
||||||
|
- `GET /version` — git commit hash and tag baked in at build time via
|
||||||
|
`build.rs`.
|
||||||
|
- S3/Wasabi storage backend with configurable endpoint and public URL.
|
||||||
|
- Database migrations run automatically on startup.
|
||||||
|
- GitHub Actions release workflow building a Linux binary on `v*` tag push.
|
||||||
|
|
||||||
|
[Unreleased]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.4...HEAD
|
||||||
|
[0.2.4]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.3...v0.2.4
|
||||||
|
[0.2.3]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.2...v0.2.3
|
||||||
|
[0.2.2]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.1...v0.2.2
|
||||||
|
[0.2.1]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.0...v0.2.1
|
||||||
|
[0.2.0]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.1.0...v0.2.0
|
||||||
|
[0.1.0]: https://git.open3dlab.com/Open3DLab/mikebase/releases/tag/v0.1.0
|
||||||
@@ -56,4 +56,29 @@ The app is an Axum HTTP server with shared state (`AppState`) containing two com
|
|||||||
|
|
||||||
## Releases
|
## Releases
|
||||||
|
|
||||||
Pushing a `v*` tag triggers the GitHub Actions release workflow, which builds a Linux binary and uploads it to a GitHub Release.
|
Pushing a `v*` tag triggers the Gitea Actions release workflow, which builds a
|
||||||
|
Linux binary, uploads it to a Gitea Release, and pushes a Docker image to the
|
||||||
|
Gitea container registry.
|
||||||
|
|
||||||
|
### Cutting a release
|
||||||
|
|
||||||
|
1. Move the `[Unreleased]` entries in `CHANGELOG.md` to a new versioned section:
|
||||||
|
```markdown
|
||||||
|
## [0.x.y] - YYYY-MM-DD
|
||||||
|
```
|
||||||
|
2. Add a new empty `## [Unreleased]` section at the top.
|
||||||
|
3. Update the comparison links at the bottom of `CHANGELOG.md`:
|
||||||
|
- Change the `[Unreleased]` link to compare the new tag against `HEAD`.
|
||||||
|
- Add a new link for the new version comparing it against the previous tag.
|
||||||
|
4. Commit: `git commit -m "Release v0.x.y"`
|
||||||
|
5. Tag and push:
|
||||||
|
```bash
|
||||||
|
git tag v0.x.y
|
||||||
|
git push origin main v0.x.y
|
||||||
|
```
|
||||||
|
|
||||||
|
### Changelog conventions
|
||||||
|
|
||||||
|
`CHANGELOG.md` follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||||
|
Group entries under: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
|
||||||
|
Record notable changes in `[Unreleased]` as you make them, not only at release time.
|
||||||
|
|||||||
Reference in New Issue
Block a user