cargo-binstall/.github/scripts/ephemeral-sign.sh
Jiahao XU 3d68641a6d
Fix release-packages and release-cli workflow (#1422)
* Fix `release-packages` and `release-cli` workflow

Fixed #1419

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Use `taiki-e/install-action` for `rsign2` & `rage` in `release-packages.yml`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-29 02:49:43 +00:00

20 lines
509 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
[[ -z "$AGE_KEY_SECRET" ]] && { echo "!!! Empty age key secret !!!"; exit 1; }
cat >> age.key <<< "$AGE_KEY_SECRET"
set -x
rage --decrypt --identity age.key --output minisign.key minisign.key.age
ts=$(node -e 'console.log((new Date).toISOString())')
git=$(git rev-parse HEAD)
comment="gh=$GITHUB_REPOSITORY git=$git ts=$ts run=$GITHUB_RUN_ID"
for file in "$@"; do
rsign sign -W -s minisign.key -x "$file.sig" -t "$comment" "$file"
done
rm age.key minisign.key