mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 11:24:24 +02:00
ci: Build binaries on new release.
This commit is contained in:
parent
8254627595
commit
1dbd933705
2 changed files with 42 additions and 0 deletions
32
.github/workflows/binary.yml
vendored
Normal file
32
.github/workflows/binary.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
# .github/workflows/binary.yml
|
||||
|
||||
name: Binary
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- {target: x86_64-unknown-linux-gnu, zipext: ".tar.gz"}
|
||||
- {target: aarch64-unknown-linux-gnu, zipext: ".tar.gz"}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cross
|
||||
- run: cargo add openssl --features vendored
|
||||
- run: cross build --locked --release --target=${{ matrix.platform.target }}
|
||||
- run: echo "BINARY_NAME=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].targets[] | select( .kind | map(. == "bin") | any ) | .name')" >> $GITHUB_ENV
|
||||
|
||||
- if: ${{ matrix.platform.zipext == '.tar.gz' }}
|
||||
run: tar -zcvf ${{env.BINARY_NAME}}-${{github.ref_name}}-${{matrix.platform.target}}.tar.gz -C target/${{matrix.platform.target}}/release ${{env.BINARY_NAME}}
|
||||
|
||||
- name: Release
|
||||
run: gh release upload ${GITHUB_REF#refs/*/} ${{env.BINARY_NAME}}-${{github.ref_name}}-${{matrix.platform.target}}${{matrix.platform.zipext}}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
10
Cross.toml
Normal file
10
Cross.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
[build]
|
||||
pre-build = [
|
||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH libgtk-3-dev:$CROSS_DEB_ARCH libgtk-layer-shell-dev:$CROSS_DEB_ARCH libpulse-dev:$CROSS_DEB_ARCH",
|
||||
]
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
|
Loading…
Add table
Reference in a new issue