Skip to content

build(deps): bump serde_with from 3.0.0 to 3.1.0 (#89) #108

build(deps): bump serde_with from 3.0.0 to 3.1.0 (#89)

build(deps): bump serde_with from 3.0.0 to 3.1.0 (#89) #108

Workflow file for this run

name: release
on:
push:
branches:
- "main"
tags:
- "v*"
jobs:
standard:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: x86_64-apple-darwin
os: macos-11
- target: aarch64-apple-darwin
os: macos-11
- target: x86_64-pc-windows-msvc
os: windows-2019
ext: ".exe"
- target: i686-pc-windows-msvc
os: windows-2019
ext: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Toolchain setup
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.config.target }}
- name: Build
run: cargo build --release --target ${{ matrix.config.target }}
- name: Upload GitHub release artifacts
uses: actions/upload-artifact@v3
with:
name: mkvdump-${{ github.ref_name }}-${{ matrix.config.target }}
path: target/${{ matrix.config.target }}/release/mkvdump${{ matrix.config.ext }}
cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- target: x86_64-unknown-linux-musl
arch: x86_64
- target: i686-unknown-linux-musl
arch: x86
- target: aarch64-unknown-linux-musl
arch: aarch64
- target: arm-unknown-linux-musleabihf
arch: armv6l
- target: armv7-unknown-linux-musleabihf
arch: armv7l
- target: i686-unknown-linux-gnu
- target: x86_64-pc-windows-gnu
ext: ".exe"
- target: i686-pc-windows-gnu
ext: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: taiki-e/install-action@cross
- name: Build
run: cross build --release --target ${{ matrix.config.target }}
- name: Upload Docker artifacts
if: ${{ matrix.config.arch != '' }}
uses: actions/upload-artifact@v3
with:
name: mkvdump-${{ matrix.config.arch }}
path: target/${{ matrix.config.target }}/release/mkvdump
- name: Upload GitHub release artifacts
uses: actions/upload-artifact@v3
with:
name: mkvdump-${{ github.ref_name }}-${{ matrix.config.target }}
path: target/${{ matrix.config.target }}/release/mkvdump${{ matrix.config.ext }}
docker:
runs-on: ubuntu-latest
needs: cross
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
cadubentzen/mkvdump
ghcr.io/cadubentzen/mkvdump
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: >-
linux/amd64,linux/386,
linux/arm64/v8,linux/arm/v6,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
debian:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Toolchain setup
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Package
run: cargo deb -p mkvdump
- name: Upload GitHub release artifacts
uses: actions/upload-artifact@v3
with:
name: mkvdump-debian
path: target/debian/mkvdump_*_amd64.deb
github-release:
runs-on: ubuntu-latest
needs:
- standard
- cross
- debian
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Compress tar.gz files
run: |
targets=(
x86_64-unknown-linux-musl
i686-unknown-linux-musl
aarch64-unknown-linux-musl
arm-unknown-linux-musleabihf
armv7-unknown-linux-musleabihf
x86_64-unknown-linux-gnu
i686-unknown-linux-gnu
x86_64-apple-darwin
aarch64-apple-darwin
)
for target in "${targets[@]}"
do
chmod +x mkvdump-${GITHUB_REF_NAME}-${target}/mkvdump
tar zcvf mkvdump-${GITHUB_REF_NAME}-${target}.tar.gz mkvdump-${GITHUB_REF_NAME}-${target}
done
- name: Compress zip files
run: |
targets=(
x86_64-pc-windows-msvc
i686-pc-windows-msvc
x86_64-pc-windows-gnu
i686-pc-windows-gnu
)
for target in "${targets[@]}"
do
zip -r mkvdump-${GITHUB_REF_NAME}-${target}.zip mkvdump-${GITHUB_REF_NAME}-${target}
done
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
mkvdump-${{ github.ref_name }}-*.tar.gz
mkvdump-${{ github.ref_name }}-*.zip
mkvdump-debian/mkvdump_*_amd64.deb
crates-io:
runs-on: ubuntu-latest
needs:
- standard
- cross
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Publish to crates.io
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}