2021-02-23 00:48:32 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
name: Create release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
make_release:
|
|
|
|
name: Create Release
|
|
|
|
runs-on: ubuntu-latest
|
2021-02-23 09:44:20 +00:00
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2021-02-23 00:48:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: Test version ${{ github.ref }}
|
|
|
|
body: |
|
|
|
|
Changes in this version
|
|
|
|
To be written by maintainer.
|
|
|
|
draft: true
|
|
|
|
prerelease: true
|
|
|
|
|
2021-02-23 09:44:20 +00:00
|
|
|
upload:
|
|
|
|
name: Create and upload builds
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ windows-latest, ubuntu-latest, macOS-latest]
|
2021-02-23 01:06:35 +00:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2021-02-23 00:48:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build release binary
|
|
|
|
run: |
|
2021-02-23 09:44:20 +00:00
|
|
|
cargo build --release
|
|
|
|
- name: Fill variables
|
|
|
|
run: |
|
|
|
|
BIN=./target/release/alfis
|
|
|
|
NAME=alfis_${GITHUB_REF##*/}.bin
|
|
|
|
- name: Windows variables
|
|
|
|
if: contains(matrix.os, 'windows')
|
|
|
|
run: |
|
|
|
|
BIN=./target/release/alfis.exe
|
|
|
|
NAME=Alfis_${GITHUB_REF##*/}.exe
|
|
|
|
- name: Upload binary
|
|
|
|
id: upload-binary
|
2021-02-23 00:48:32 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-02-23 09:44:20 +00:00
|
|
|
upload_url: ${{ needs.make_release.outputs.upload_url }}
|
|
|
|
asset_path: $BIN
|
|
|
|
asset_name: $NAME
|
2021-02-23 00:48:32 +00:00
|
|
|
asset_content_type: application/octet-stream
|