put current executable name to the default config, not /bin/bash #12
Workflow file for this run
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: | |
- '*' | |
jobs: | |
publish: | |
# define multiple targets | |
name: Publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
executable: alias | |
asset_name: alias-linux | |
- os: windows-latest | |
executable: alias.exe | |
asset_name: alias-windows | |
- os: macos-latest | |
executable: alias | |
asset_name: alias-macos | |
# build | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: enable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: build | |
run: cargo build --release | |
- name: Set enviroment for github-release | |
run: | | |
echo "RELEASE_TAG=$( echo ${GITHUB_REF##*/} )" >> $GITHUB_ENV | |
- name: create archive | |
uses: master-atul/[email protected] | |
with: | |
command: c | |
cwd: ./target/release/ | |
files: | | |
${{ matrix.executable }} | |
outPath: target/release/${{ matrix.asset_name }}-${{ env.RELEASE_TAG }}.tar.gz | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: | | |
target/release/${{ matrix.asset_name }}-${{ env.RELEASE_TAG }}.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |