-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 1.73 KB
/
Copy pathrelease.yml
File metadata and controls
72 lines (60 loc) · 1.73 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
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: Build ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
container: ubuntu:25.04
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Install system deps
run: |
apt-get update -q
apt-get install -y -q \
git curl build-essential file \
libgtk-4-dev libadwaita-1-dev \
libglib2.0-dev-bin jq
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
- name: Build and package
run: ./resources/package.sh all
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: onesync-${{ github.ref_name }}-${{ matrix.arch }}
path: build/onesync-*
create-release:
name: Create release
needs: release
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create release and upload
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE" 2>/dev/null || true
gh release delete "${{ github.ref_name }}" --yes 2>/dev/null || true
gh release create "${{ github.ref_name }}" \
--title "${{ github.ref_name }}" \
--generate-notes \
artifacts/onesync-*