Skip to content

ci(actions): set sh_checker_shfmt_disable as true #23

ci(actions): set sh_checker_shfmt_disable as true

ci(actions): set sh_checker_shfmt_disable as true #23

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
defaults:
run:
shell: bash
env:
MAINTAINER: "xrelkd <46590321+xrelkd@users.noreply.github.com>"
PACKAGE_NAME: "clipcat"
PACKAGE_DESCRIPTION: "Clipboard manager written in Rust Programming Language"
jobs:
all:
name: Release
strategy:
matrix:
target:
- aarch64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- x86_64-unknown-linux-musl
# TODO: support macOS in the future?
# - x86_64-apple-darwin
include:
- target: aarch64-unknown-linux-musl
arch: arm64
os: ubuntu-latest
target_rustflags: "--codegen linker=aarch64-linux-gnu-gcc"
- target: armv7-unknown-linux-musleabihf
arch: armhf
os: ubuntu-latest
target_rustflags: "--codegen linker=arm-linux-gnueabihf-gcc"
- target: x86_64-unknown-linux-musl
arch: amd64
os: ubuntu-latest
target_rustflags: ""
# TODO: support macOS in the future?
# - target: x86_64-apple-darwin
# os: macos-latest
# target_rustflags: ""
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt install -y protobuf-compiler
- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
with:
override: true
target: ${{ matrix.target }}
toolchain: stable
- name: Install AArch64 Toolchain
if: ${{ matrix.target == 'aarch64-unknown-linux-musl' }}
run: |
sudo apt update
sudo apt install -y gcc-aarch64-linux-gnu
- name: Install ARM7 Toolchain
if: ${{ matrix.target == 'armv7-unknown-linux-musleabihf' }}
run: |
sudo apt update
sudo apt install -y gcc-arm-linux-gnueabihf
- name: Create Package
id: package
env:
TARGET: ${{ matrix.target }}
REF: ${{ github.ref }}
OS: ${{ matrix.os }}
TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }}
run: ./dev-support/bin/create-package
shell: bash
- name: Prepare Debian Package
env:
TARGET: ${{ matrix.target }}
REF: ${{ github.ref }}
OS: ${{ matrix.os }}
ARCH: ${{ matrix.arch }}
TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }}
run: ./dev-support/bin/prepare-deb-package
shell: bash
- name: Create Debian Package
id: debian-package
uses: jiro4989/build-deb-action@v3
with:
package: ${{ env.PACKAGE_NAME }}
package_root: debian
maintainer: ${{ env.MAINTAINER }}
version: ${{ github.ref }}
arch: ${{ matrix.arch }}
desc: ${{ env.PACKAGE_DESCRIPTION }}
- name: Publish Package Archive
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
draft: false
files: ${{ steps.package.outputs.archive }}
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Debian Package
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
draft: false
files: ${{ steps.debian-package.outputs.file_name }}
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}