Skip to content

Update release.yml

Update release.yml #5

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
publish:
name: publish ${{ matrix.name }}
needs:
- release
strategy:
fail-fast: true
matrix:
include:
- target: x86_64-unknown-linux-gnu
suffix: linux-x86_64
archive: tar.xz
name: x86_64-unknown-linux-gnu
- target: x86_64-apple-darwin
suffix: darwin-x86_64
archive: tar.gz
name: x86_64-apple-darwin
- target: aarch64-apple-darwin
suffix: darwin-x86_64
archive: tar.gz
name: aarch64-apple-darwin
runs-on: ubuntu-latest
steps:
- name: Clone test repository
uses: actions/checkout@v2
- uses: xhaiker/rust-release.action@v1.0.0
name: build ${{ matrix.name }}
with:
release: ${{ github.ref_name }}
rust_target: ${{ matrix.target }}
archive_suffix: ${{ matrix.suffix }}
archive_types: ${{ matrix.archive }}
extra_files: "README.md README_zh.md LICENSE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}