Skip to content

Merge pull request #153 from cyphar/dependabot/cargo/clap-4.5.27 #160

Merge pull request #153 from cyphar/dependabot/cargo/clap-4.5.27

Merge pull request #153 from cyphar/dependabot/cargo/clap-4.5.27 #160

Workflow file for this run

# paperback: paper backup generator suitable for long-term storage
# Copyright (C) 2018-2022 Aleksa Sarai <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
on:
push:
branches: [ main ]
release:
types: [ published ]
name: binaries
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux, macos, win-msvc, win32-msvc]
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
- build: macos
os: macos-latest
target: x86_64-apple-darwin
- build: win-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
- build: win32-msvc
os: windows-2019
target: i686-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable
- run: rustup target add ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: cargo build
run: cargo build --target ${{ matrix.target }} --release --all-features
- name: strip paperback binary
if: matrix.build == 'linux' || matrix.build == 'macos'
run: strip target/${{ matrix.target }}/release/paperback
- name: upload unix binaries
uses: actions/upload-artifact@v4
if: contains(matrix.build, 'win') == false
with:
name: "paperback.${{ matrix.target }}"
path: "target/${{ matrix.target }}/release/paperback"
- name: upload windows binaries
uses: actions/upload-artifact@v4
if: contains(matrix.build, 'win')
with:
name: "paperback-${{ matrix.target }}.exe"
path: "target/${{ matrix.target }}/release/paperback.exe"