Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

Commit 5d7ec94

Browse files
add release image (#1996)
Co-authored-by: Quanyi Ma <eli@patch.sh>
1 parent 0997c64 commit 5d7ec94

4 files changed

Lines changed: 74 additions & 78 deletions

File tree

‎.github/release-template.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Mega Release
2+
3+
Version: ${VERSION}
4+
5+
---
6+
7+
## Docker Images
8+
9+
### mono-engine
10+
11+
docker pull ghcr.io/web3infra-foundation/mono-engine:${VERSION}
12+
13+
### ui
14+
15+
docker pull ghcr.io/web3infra-foundation/ui:${VERSION}
16+
17+
### orion-server
18+
19+
docker pull ghcr.io/web3infra-foundation/orion-server:${VERSION}
20+
21+
---
22+
23+
## Changes
24+
25+
- Describe major changes here

‎.github/workflows/orion-client-image-deploy.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ on:
1010
- "orion/entrypoint.sh"
1111
- "orion/scorpio.toml.template"
1212
- "orion/**"
13-
- "ceres/**"
14-
- "jupiter/**"
1513
- "common/**"
16-
- "context/**"
1714

1815
permissions:
1916
id-token: write

‎.github/workflows/release.yml‎

Lines changed: 46 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,69 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
54
push:
65
tags:
7-
- "v*.*.*"
6+
- "v*"
87

98
permissions:
109
contents: write
11-
10+
packages: write
1211
jobs:
13-
upload-assets:
12+
build:
13+
runs-on: ubuntu-latest
14+
1415
strategy:
1516
matrix:
1617
include:
17-
- target: x86_64-unknown-linux-gnu
18-
arch: amd64
19-
os: ubuntu-latest
20-
- target: aarch64-apple-darwin
21-
arch: aarch64
22-
os: macos-latest
23-
- target: x86_64-pc-windows-msvc
24-
arch: x64
25-
os: windows-latest
26-
runs-on: ${{ matrix.os }}
18+
- name: mono-engine
19+
context: .
20+
dockerfile: mono/Dockerfile
21+
22+
- name: ui
23+
context: moon
24+
dockerfile: moon/apps/web/Dockerfile
25+
26+
- name: orion-server
27+
context: .
28+
dockerfile: orion-server/Dockerfile
29+
2730
steps:
28-
- name: Checkout repository
31+
- name: Checkout
2932
uses: actions/checkout@v4
30-
with:
31-
submodules: recursive
32-
lfs: true
3333

34-
- name: Install system dependencies
35-
uses: ./.github/install-dep
34+
- name: Login GHCR
35+
uses: docker/login-action@v3
3636
with:
37-
cache-key: sysdeps
38-
platform: ${{ matrix.os }}
39-
40-
- name: Building
41-
run: |
42-
cargo install --locked cargo-packager
43-
cargo build --release --manifest-path libra/Cargo.toml
44-
cargo packager --release --manifest-path monobean/Cargo.toml --config monobean/resources/packager_${{ matrix.target}}.toml
37+
registry: ghcr.io
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
4540

46-
- name: Prepare Linux
47-
if: contains(matrix.os, 'ubuntu')
48-
run: |
49-
# makepkg monobean/target/build/
50-
mv target/release/libra ${{ github.workspace }}/libra_${{ github.ref_name }}_${{ matrix.target }}
51-
# mv monobean/target/build/Monobean__${{ matrix.arch }}.tar.gz.zst ${{ github.workspace }}/Monobean_${{ github.ref_name }}_${{ matrix.target }}.tar.gz.zst
52-
mv monobean/target/build/monobean__${{ matrix.arch }}.deb ${{ github.workspace }}/Monobean_${{ github.ref_name }}_${{ matrix.target }}.deb
53-
54-
- name: Prepare Windows
55-
if: contains(matrix.os, 'windows')
56-
run: |
57-
mv target/release/libra.exe ${{ github.workspace }}/libra_${{ github.ref_name }}_${{ matrix.target }}.exe
58-
mv monobean/target/build/monobean_0.0.1_${{ matrix.arch }}-setup.exe ${{ github.workspace }}/Monobean_${{ github.ref_name }}_${{ matrix.target }}.exe
41+
- name: Extract Tag
42+
id: tag
43+
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
5944

60-
- name: Prepare MacOS
61-
if: contains(matrix.os, 'macos')
62-
run: |
63-
mv target/release/libra ${{ github.workspace }}/libra_${{ github.ref_name }}_${{ matrix.target }}
64-
mv monobean/target/build/Monobean__${{ matrix.arch }}.dmg ${{ github.workspace }}/Monobean_${{ github.ref_name }}_${{ matrix.target }}.dmg
65-
66-
- name: Release Linux
67-
if: contains(matrix.os, 'ubuntu')
68-
uses: softprops/action-gh-release@v2
45+
- name: Build and Push
46+
uses: docker/build-push-action@v5
6947
with:
70-
token: ${{ secrets.GITHUB_TOKEN }}
71-
draft: true
72-
files: |
73-
libra_${{ github.ref_name }}_${{ matrix.target }}
74-
# Monobean_${{ github.ref_name }}_${{ matrix.target }}.tar.gz.zst
75-
Monobean_${{ github.ref_name }}_${{ matrix.target }}.deb
48+
context: ${{ matrix.context }}
49+
file: ${{ matrix.dockerfile }}
50+
push: true
51+
tags: |
52+
ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}:${{ steps.tag.outputs.TAG }}
53+
ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}:latest
54+
create-release:
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- uses: actions/checkout@v4
7659

77-
- name: Release Windows
78-
if: contains(matrix.os, 'windows')
79-
uses: softprops/action-gh-release@v2
80-
with:
81-
token: ${{ secrets.GITHUB_TOKEN }}
82-
draft: true
83-
files: |
84-
libra_${{ github.ref_name }}_${{ matrix.target }}.exe
85-
Monobean_${{ github.ref_name }}_${{ matrix.target }}.exe
60+
- name: Generate Release Notes
61+
run: |
62+
VERSION=${GITHUB_REF#refs/tags/}
63+
sed "s/\${VERSION}/$VERSION/g" .github/release-template.md > release.md
8664
87-
- name: Release MacOS
88-
if: contains(matrix.os, 'macos')
65+
- name: Create Release
8966
uses: softprops/action-gh-release@v2
9067
with:
91-
token: ${{ secrets.GITHUB_TOKEN }}
92-
draft: true
93-
files: |
94-
libra_${{ github.ref_name }}_${{ matrix.target }}
95-
Monobean_${{ github.ref_name }}_${{ matrix.target }}.dmg
68+
body_path: release.md
69+
overwrite_files: true

‎.gitignore‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Generated by Cargo
22
# will have compiled files and executables
33
/target
4-
/monobean/target
5-
/scorpio/target
64
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
75
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
86
Cargo.lock
@@ -54,4 +52,6 @@ orion-server/test-artifacts/
5452
orion-server/docker-compose.override.yml
5553

5654
# local dev environment
57-
/scripts/dev/.env
55+
/scripts/dev/.env
56+
57+
.buildx-cache

0 commit comments

Comments
 (0)