summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2021-01-10 11:11:14 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2021-01-10 14:44:46 +0100
commit2cfeebab90eb88c8229967c5e6d43ec1576651d3 (patch)
tree23d2cae653d44244b2db21385d1202d6e5d637a6 /.github
parente3b114236452dc5a9084f623b3bd4b39100edd15 (diff)
CICD: Use 'cargo get' to extract crate metadata
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/CICD.yml17
1 files changed, 12 insertions, 5 deletions
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml
index 0899efee..a83275bc 100644
--- a/.github/workflows/CICD.yml
+++ b/.github/workflows/CICD.yml
@@ -1,11 +1,6 @@
name: CICD
env:
- PROJECT_NAME: bat
- PROJECT_VERSION: "0.17.1"
- PROJECT_DESC: "A `cat` clone with wings"
- PROJECT_MAINTAINER: "David Peter <mail@david-peter.de>"
- PROJECT_HOMEPAGE: "https://github.com/sharkdp/bat"
MIN_SUPPORTED_RUST_VERSION: "1.42.0"
on: [push, pull_request]
@@ -105,6 +100,18 @@ jobs:
arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
esac
+ - name: Install 'cargo get'
+ uses: actions-rs/install@v0.1
+ with:
+ crate: cargo-get
+ version: latest
+ - name: Extract crate information
+ shell: bash
+ run: |
+ echo "PROJECT_NAME=$(cargo get --name)" >> $GITHUB_ENV
+ echo "PROJECT_VERSION=$(cargo get version --full)" >> $GITHUB_ENV
+ echo "PROJECT_MAINTAINER=$(cargo get --authors)" >> $GITHUB_ENV
+ echo "PROJECT_HOMEPAGE=$(cargo get --homepage)" >> $GITHUB_ENV
- name: Initialize workflow variables
id: vars
shell: bash