Skip to content

Commit

Permalink
CD: Use centralized workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaigalos committed Feb 19, 2023
1 parent d4b0c1e commit 4850e4f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/cd.yaml
Expand Up @@ -13,8 +13,34 @@ on:
default: false

jobs:
generate-cd-inputs:
runs-on: ubuntu-latest
outputs:
description: ${{ steps.set-outputs.outputs.description }}
homepage: ${{ steps.set-outputs.outputs.homepage }}
maintainer: ${{ steps.set-outputs.outputs.maintainer }}
project-name: ${{ steps.set-outputs.outputs.project-name }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set outputs
id: set-outputs
run: |
set -eu pipefail
echo "::set-output name=description::$(grep ^description Cargo.toml | cut -d'=' -f2 | sed -e 's/\s*//' -e 's/\"//g')"
echo "::set-output name=homepage::$(grep ^repository Cargo.toml | cut -d'=' -f2 | sed -e 's/\s*//' -e 's/\"//g')"
echo "::set-output name=maintainer::$(grep ^authors Cargo.toml | cut -d'=' -f2 | sed -e 's/[][]//g' -e 's/\s*//' -e 's/\"//g')"
echo "::set-output name=project-name::$(grep ^name Cargo.toml | cut -d'=' -f2 | sed -e 's/\s*//' -e 's/\"//g')"
cd:
uses: mihaigalos/config/.github/workflows/rust-cd-crates-io-only.yaml@main
uses: mihaigalos/config/.github/workflows/rust-cd-crates-io-and-github.yaml@main
needs:
- generate-cd-inputs
with:
COPYRIGHT_YEARS: 2021-3021
DESCRIPTION: ${{ needs.generate-cd-inputs.outputs.description }}
HOMEPAGE: ${{ needs.generate-cd-inputs.outputs.homepage }}
MAINTAINER: ${{ needs.generate-cd-inputs.outputs.maintainer }}
PROJECT_NAME: ${{ needs.generate-cd-inputs.outputs.project-name }}
secrets:
CARGO_API_KEY: ${{ secrets.CARGO_API_KEY }}

2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "dusage"
version = "0.3.4"
version = "0.3.5"
edition = "2021"
authors = ["Mihai Galos <mihaigalos@gmail.com>"]
description = "💾 A command line disk usage information tool: disk usage (foreground), inodes (background)."
Expand Down

0 comments on commit 4850e4f

Please sign in to comment.