Skip to content

Commit 4850e4f

Browse files
committed
CD: Use centralized workflow
1 parent d4b0c1e commit 4850e4f

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

.github/workflows/cd.yaml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,34 @@ on:
1313
default: false
1414

1515
jobs:
16+
generate-cd-inputs:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
description: ${{ steps.set-outputs.outputs.description }}
20+
homepage: ${{ steps.set-outputs.outputs.homepage }}
21+
maintainer: ${{ steps.set-outputs.outputs.maintainer }}
22+
project-name: ${{ steps.set-outputs.outputs.project-name }}
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
- name: Set outputs
27+
id: set-outputs
28+
run: |
29+
set -eu pipefail
30+
echo "::set-output name=description::$(grep ^description Cargo.toml | cut -d'=' -f2 | sed -e 's/\s*//' -e 's/\"//g')"
31+
echo "::set-output name=homepage::$(grep ^repository Cargo.toml | cut -d'=' -f2 | sed -e 's/\s*//' -e 's/\"//g')"
32+
echo "::set-output name=maintainer::$(grep ^authors Cargo.toml | cut -d'=' -f2 | sed -e 's/[][]//g' -e 's/\s*//' -e 's/\"//g')"
33+
echo "::set-output name=project-name::$(grep ^name Cargo.toml | cut -d'=' -f2 | sed -e 's/\s*//' -e 's/\"//g')"
34+
1635
cd:
17-
uses: mihaigalos/config/.github/workflows/rust-cd-crates-io-only.yaml@main
36+
uses: mihaigalos/config/.github/workflows/rust-cd-crates-io-and-github.yaml@main
37+
needs:
38+
- generate-cd-inputs
39+
with:
40+
COPYRIGHT_YEARS: 2021-3021
41+
DESCRIPTION: ${{ needs.generate-cd-inputs.outputs.description }}
42+
HOMEPAGE: ${{ needs.generate-cd-inputs.outputs.homepage }}
43+
MAINTAINER: ${{ needs.generate-cd-inputs.outputs.maintainer }}
44+
PROJECT_NAME: ${{ needs.generate-cd-inputs.outputs.project-name }}
1845
secrets:
1946
CARGO_API_KEY: ${{ secrets.CARGO_API_KEY }}
20-

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dusage"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55
authors = ["Mihai Galos <mihaigalos@gmail.com>"]
66
description = "💾 A command line disk usage information tool: disk usage (foreground), inodes (background)."

0 commit comments

Comments
 (0)