Update rust_create_release.yml

This commit is contained in:
Revertron
2021-02-23 14:54:48 +01:00
committed by GitHub
parent c05082eaf1
commit cbada24e56
+22 -5
View File
@@ -8,9 +8,25 @@ env:
name: Create release
jobs:
get_version:
name: Get version from Cargo.toml
runs-on: ubuntu-latest
outputs:
project_version: "$(cat version.txt)"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: install libgtk-dev libwebkit2gtk-4.0
run: sudo apt update && sudo apt install libwebkit2gtk-4.0-dev
if: contains(matrix.os, 'ubuntu')
- name: Build project
run: |
cargo build
make_release:
name: Create Release
runs-on: ubuntu-latest
needs: get_version
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
@@ -20,10 +36,11 @@ jobs:
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
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ needs.get_version.outputs.version }}
with:
tag_name: ${{ github.ref }}
release_name: Test version ${{ github.ref }}
tag_name: v${{ env.VERSION }}
release_name: Test version v${{ env.VERSION }}
body: |
Changes in this version
To be written by maintainer.
@@ -53,12 +70,12 @@ jobs:
- name: Fill variables
run: |
echo "BIN_PATH=./target/release/alfis" >> $GITHUB_ENV
echo "BIN_NAME=alfis_${GITHUB_REF##*/}.zip" >> $GITHUB_ENV
echo "BIN_NAME=alfis_${env.VERSION}.zip" >> $GITHUB_ENV
- name: Windows variables
if: contains(matrix.os, 'windows')
run: |
echo "BIN_PATH=target/release/alfis.exe" >> $GITHUB_ENV
echo "BIN_NAME=alfis_${GITHUB_REF##*/}.zip" >> $GITHUB_ENV
echo "BIN_NAME=alfis_${env.VERSION}.zip" >> $GITHUB_ENV
- name: Packaging
uses: papeloto/action-zip@v1
with: