oxipng/.github/workflows/deploy.yml
2020-05-11 09:38:11 -04:00

47 lines
1.3 KiB
YAML

name: deploy
on:
push:
tags:
- 'v*.*.*'
jobs:
deploy-windows:
runs-on: windows-latest
strategy:
matrix:
conf:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc
include:
- conf: x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
- conf: i686-pc-windows-msvc
target: i686-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- uses: olegtarasov/get-tag@v2
id: tagName
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
profile: minimal
toolchain: stable
override: true
- name: Build oxipng
run: |
cargo build --release --target ${{ matrix.target }}
strip target/release/oxipng.exe
- name: Create zip
run: |
$OXIPNG_PATH="$Env:GITHUB_WORKSPACE\target\release"
7z a oxipng-${{ steps.tagName.outputs.tag }}-${{ matrix.target }}.zip "$OXIPNG_PATH\oxipng.exe"
- name: Create a release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.tagName.outputs.tag }}
files: |
oxipng-${{ steps.tagName.outputs.tag }}-${{ matrix.target }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}