Repository navigation
117 lines (103 loc) · 3.66 KB
/
Copy pathrelease.yml
File metadata and controls
117 lines (103 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
env:
CARGO_TERM_COLOR: always
jobs:
build-release:
name: Build Release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
asset_name: aether-linux-amd64
- os: macos-latest
target: aarch64-apple-darwin
asset_name: aether-macos-arm64
# Cross-compile Intel macOS on Apple Silicon runners (macos-13 is scarce)
- os: macos-latest
target: x86_64-apple-darwin
asset_name: aether-macos-amd64
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}
- name: Package asset
run: |
BIN="target/${{ matrix.target }}/release/aether"
strip "$BIN" || true
cp "$BIN" "${{ matrix.asset_name }}"
shasum -a 256 "${{ matrix.asset_name }}" > "${{ matrix.asset_name }}.sha256"
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: |
${{ matrix.asset_name }}
${{ matrix.asset_name }}.sha256
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-container:
name: Publish Container Image
runs-on: ubuntu-latest
# Explicit job scopes — repo default was read-only and GHCR push failed with
# permission_denied: read_package even with top-level packages: write.
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
# Match guestkit: login as the triggering actor with GITHUB_TOKEN.
# Using repository_owner while actor is ssahani caused
# permission_denied: read_package on push.
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
# GHCR requires lowercase; github.repository is zyvorai/Aether.
images: ghcr.io/${{ github.repository_owner }}/aether
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
labels: |
org.opencontainers.image.title=Aether
org.opencontainers.image.description=Universal runtime control plane - One spec, three runtimes
org.opencontainers.image.vendor=ZyvorAI Labs
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.source=https://github.com/${{ github.repository }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.aether
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# amd64-only for release speed; arm64 QEMU compile took ~2h and still
# failed at push. Re-add linux/arm64 once GHCR ACL is proven green.
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false