Merge pull request #276 from xrelkd/hotfix/0.16.3 #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- hotfix/* | |
- release/* | |
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: | |
- x86_64-unknown-linux-musl | |
include: | |
- target: x86_64-unknown-linux-musl | |
arch_deb: amd64 | |
arch_rpm: x86_64 | |
os: ubuntu-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 --no-install-recommends musl-tools protobuf-compiler libprotobuf-dev | |
- name: Install Rust Toolchain Components | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
target: ${{ matrix.target }} | |
toolchain: stable | |
- 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 DEB Package | |
env: | |
TARGET: ${{ matrix.target }} | |
REF: ${{ github.ref }} | |
OS: ${{ matrix.os }} | |
ARCH: ${{ matrix.arch_deb }} | |
TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }} | |
run: ./dev-support/bin/prepare-deb-package | |
if: ${{ matrix.arch_deb == 'amd64' }} | |
shell: bash | |
- name: Create DEB Package | |
id: deb-package | |
uses: jiro4989/build-deb-action@v3 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch_deb == 'amd64' }} | |
with: | |
package: ${{ env.PACKAGE_NAME }} | |
package_root: .debpkg | |
maintainer: ${{ env.MAINTAINER }} | |
version: ${{ github.ref }} | |
arch: ${{ matrix.arch_deb }} | |
desc: ${{ env.PACKAGE_DESCRIPTION }} | |
- name: Prepare RPM Package | |
env: | |
TARGET: ${{ matrix.target }} | |
REF: ${{ github.ref }} | |
OS: ${{ matrix.os }} | |
ARCH: ${{ matrix.arch_rpm }} | |
TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }} | |
run: ./dev-support/bin/prepare-rpm-package | |
if: ${{ matrix.arch_rpm == 'x86_64' }} | |
shell: bash | |
- name: Create RPM Package | |
id: rpm-package | |
uses: jiro4989/build-rpm-action@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch_rpm == 'x86_64' }} | |
with: | |
summary: ${{ env.PACKAGE_DESCRIPTION }} | |
package: ${{ env.PACKAGE_NAME }} | |
package_root: .rpmpkg | |
maintainer: ${{ env.MAINTAINER }} | |
version: ${{ github.ref }} | |
arch: ${{ matrix.arch_rpm }} | |
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 DEB Package | |
uses: softprops/action-gh-release@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch_deb == 'amd64' }} | |
with: | |
draft: false | |
files: ${{ steps.deb-package.outputs.file_name }} | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish RPM Package | |
uses: softprops/action-gh-release@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch_rpm == 'x86_64' }} | |
with: | |
draft: false | |
files: ${{ steps.rpm-package.outputs.file_name }} | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |