Commit b891f3ae5e

b891f3ae5ef0a8da73879ac71795777ffe6ed213

parent: 1e473a4fb2

Unregistered key

Ulyssa <git@ulyssa.dev> · 2026-10-21 04:43 UTC
committer: <noreply@github.com>

Add workflow for uploading iamb release artifacts (#823)

Layout: unified · split

.github/workflows/binaries.yml +13 −3
@@ -33,12 +33,13 @@ jobs:
3333 RUSTC_WRAPPER: "sccache"
3434 steps:
3535 - name: Checkout code
36 uses: actions/checkout@v3
36 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3737 with:
3838 submodules: true
3939 - name: Install Rust (stable)
40 uses: dtolnay/rust-toolchain@stable
40 uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8
4141 with:
42 toolchain: stable
4243 targets: ${{ env.TARGET }}
4344 - name: Install C cross-compilation toolchain
4445 if: matrix.platform == 'ubuntu-latest'
@@ -46,7 +47,7 @@ jobs:
4647 sudo apt-get update
4748 sudo apt install -f -y build-essential crossbuild-essential-arm64 musl-dev
4849 # Cross-compilation env vars for x86_64-unknown-linux-musl
49 echo CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc >> $GITHUB_ENV
50 echo CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc >> $GITHUB_ENV
5051 echo AR_x86_64_unknown_linux_musl=x86_64-linux-gnu-ar >> $GITHUB_ENV
5152 echo CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc >> $GITHUB_ENV
5253 echo CXX_x86_64_unknown_linux_musl=x86_64-linux-gnu-g++ >> $GITHUB_ENV
@@ -71,6 +72,15 @@ jobs:
7172 path: |
7273 ./target/${{ env.TARGET }}/release/iamb
7374 ./target/${{ env.TARGET }}/release/iamb.exe
75 - name: 'Package: tgz'
76 run: |
77 cargo +stable install --locked cargo-tar
78 cargo +stable tar --target ${{ env.TARGET }}
79 - name: 'Upload: tgz'
80 uses: actions/upload-artifact@v4
81 with:
82 name: iamb-${{ env.TARGET }}-tgz
83 path: ./target/tar/iamb*-${{ env.TARGET }}.tar.gz
7484 - name: 'Package: deb'
7585 if: matrix.platform == 'ubuntu-latest'
7686 run: |
.github/workflows/release.yml added +117
@@ -0,0 +1,117 @@
1name: Release
2
3on:
4 push:
5 tags:
6 - "v*.*.*"
7
8defaults:
9 run:
10 shell: bash
11
12jobs:
13 prep-release:
14 runs-on: 'ubuntu-slim'
15 permissions:
16 contents: write
17 steps:
18 - name: Checkout
19 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20 with:
21 persist-credentials: false
22
23 - name: Create draft release
24 run: |
25 gh release create ${TAG} --draft=true --target ${{ github.sha }} --title ${TAG}
26 env:
27 TAG: ${{ github.ref_name }}
28 GH_TOKEN: ${{ github.token }}
29
30 build:
31 needs: prep-release
32 strategy:
33 matrix:
34 platform: [ubuntu-latest, windows-latest, macos-latest]
35 arch: [x86_64, aarch64]
36 exclude:
37 - platform: windows-latest
38 arch: aarch64
39 include:
40 - platform: ubuntu-latest
41 arch: x86_64
42 triple: unknown-linux-musl
43 - platform: ubuntu-latest
44 arch: aarch64
45 triple: unknown-linux-gnu
46 - platform: macos-latest
47 triple: apple-darwin
48 - platform: windows-latest
49 triple: pc-windows-msvc
50 fail-fast: false
51 runs-on: ${{ matrix.platform }}
52 permissions:
53 contents: write
54 env:
55 TARGET: ${{ matrix.arch }}-${{ matrix.triple }}
56 steps:
57 - name: Checkout
58 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
59 with:
60 persist-credentials: false
61 - name: Install Rust (stable)
62 uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8
63 with:
64 toolchain: stable
65 targets: ${{ env.TARGET }}
66 - name: Install C cross-compilation toolchain
67 if: matrix.platform == 'ubuntu-latest'
68 run: |
69 sudo apt-get update
70 sudo apt install -f -y build-essential crossbuild-essential-arm64 musl-dev
71 # Cross-compilation env vars for x86_64-unknown-linux-musl
72 echo CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc >> $GITHUB_ENV
73 echo AR_x86_64_unknown_linux_musl=x86_64-linux-gnu-ar >> $GITHUB_ENV
74 echo CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc >> $GITHUB_ENV
75 echo CXX_x86_64_unknown_linux_musl=x86_64-linux-gnu-g++ >> $GITHUB_ENV
76 # Cross-compilation env vars for aarch64-unknown-linux-gnu
77 echo CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc >> $GITHUB_ENV
78 echo AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar >> $GITHUB_ENV
79 echo CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc >> $GITHUB_ENV
80 echo CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ >> $GITHUB_ENV
81 - name: 'Build: binary'
82 run: |
83 cargo +stable build --profile=release-lto --locked --target=${{ env.TARGET }}
84 - name: 'Package: tgz'
85 run: |
86 cargo +stable install --locked cargo-tar
87 cargo +stable tar --profile=release-lto --target ${{ env.TARGET }}
88 - name: 'Upload: tgz'
89 run: |
90 gh release upload ${TAG} ./target/tar/iamb*-${{ env.TARGET }}.tar.gz
91 env:
92 TAG: ${{ github.ref_name }}
93 GH_TOKEN: ${{ github.token }}
94 - name: 'Package: deb'
95 if: matrix.platform == 'ubuntu-latest'
96 run: |
97 cargo +stable install --locked cargo-deb
98 cargo +stable deb --profile=release-lto --no-strip --target ${{ env.TARGET }}
99 - name: 'Upload: deb'
100 if: matrix.platform == 'ubuntu-latest'
101 run: |
102 gh release upload ${TAG} ./target/${{ env.TARGET }}/debian/iamb*.deb
103 env:
104 TAG: ${{ github.ref_name }}
105 GH_TOKEN: ${{ github.token }}
106 - name: 'Package: rpm'
107 if: matrix.platform == 'ubuntu-latest'
108 run: |
109 cargo +stable install --locked cargo-generate-rpm
110 cargo +stable generate-rpm --profile=release-lto --target ${{ env.TARGET }}
111 - name: 'Upload: rpm'
112 if: matrix.platform == 'ubuntu-latest'
113 run: |
114 gh release upload ${TAG} ./target/${{ env.TARGET }}/generate-rpm/iamb*.rpm
115 env:
116 TAG: ${{ github.ref_name }}
117 GH_TOKEN: ${{ github.token }}
Cargo.toml +18
@@ -164,3 +164,21 @@ assets = [
164164 { source = "docs/iamb.svg", dest = "/usr/share/icons/hicolor/scalable/apps/iamb.svg", mode = "644"},
165165 { source = "docs/iamb.metainfo.xml", dest = "/usr/share/metainfo/iamb.metainfo.xml", mode = "644"},
166166]
167
168[package.metadata.tar]
169format = "tar.gz"
170assets = [
171 # License:
172 { source = "LICENSE", dest = "LICENSE", mode = "644" },
173 # Manual pages:
174 { source = "docs/iamb.1", dest = "docs/iamb.1", mode = "644" },
175 { source = "docs/iamb.5", dest = "docs/iamb.5", mode = "644" },
176 # Packaged themes:
177 { source = "themes/*.toml", dest = "themes/", mode = "644" },
178 # Other assets:
179 { source = "iamb.desktop", dest = "assets/iamb.desktop", mode = "644" },
180 { source = "config.example.toml", dest = "assets/config.example.toml", mode = "644"},
181 { source = "config.full.toml", dest = "assets/config.full.toml", mode = "644"},
182 { source = "docs/iamb.svg", dest = "assets/iamb.svg", mode = "644"},
183 { source = "docs/iamb.metainfo.xml", dest = "assets/iamb.metainfo.xml", mode = "644"},
184]