.github/workflows/rust-release.yml #15
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: | |
# push: | |
# tags: | |
# - 'v*' | |
workflow_dispatch: # this is a nice option that will enable a button w/ inputs | |
inputs: | |
git-ref: | |
description: Git Ref (Optional) | |
required: false | |
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: v${{ 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-pc-windows-gnu | |
suffix: windows-x86_64 | |
archive: zip | |
- target: x86_64-unknown-linux-gnu | |
suffix: linux-x86_64 | |
archive: tar.gz | |
- target: x86_64-apple-darwin | |
suffix: darwin-x86_64 | |
archive: tar.gz | |
- target: aarch64-apple-darwin | |
suffix: darwin-aarch64 | |
archive: tar.gz | |
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 }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |