Fixed release #1
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: | ||
release: | ||
types: | ||
- created | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [macos, linux, windows] | ||
arch: [arm64, x64] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust | ||
uses: actions/setup-rust@v1 | ||
- name: Install cross | ||
run: cargo install cross | ||
- name: Build release binaries | ||
run: cross build --release --target ${{ matrix.os }}-{{ matrix.arch }} | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: find-pep-${{ matrix.os }}-${{ matrix.arch }} | ||
path: target/${{ matrix.os }}-${{ matrix.arch }}/release/find-pep | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: find-pep-${{ matrix.os }}-${{ matrix.arch }} | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/${{ matrix.os }}-${{ matrix.arch }}/release/find-pep | ||
tag_name: ${{ github.event_name }}-v${{ github.run_number }} | ||
title: ${{ github.event_name }} Release | ||
matrix: | ||
include: | ||
- os: macos | ||
arch: arm64 | ||
- os: macos | ||
arch: x64 | ||
- os: linux | ||
arch: x64 | ||
- os: windows | ||
arch: x64 |