Skip to content

Commit

Permalink
Remove gpg hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 17, 2025
1 parent 167d91e commit fddf5d9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,18 @@ jobs:
- run: tar cJf $FILENAME pkgx

- name: GPG sign archive
# NOTE the +sqlite3 is a bug that we can’t figure out that only fails
# on darwin aarch64 in CI, the sqlite dep is not installed for some
# reason. Works locally! So we're confused and stuck.
run: |
./pkgx gpg-agent --daemon || true
echo $GPG_PRIVATE_KEY | \
base64 -d | \
./pkgx +sqlite3 gpg --import --batch --yes
./pkgx gpg --import --batch --yes
./pkgx gpg \
--detach-sign --armor \
--local-user $GPG_KEY_ID \
$FILENAME
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
if: matrix.platform.build-id != 'linux+x86-64'
# ^^ pkgx^2 deployment woe

- run: echo 'naughty-boy' > $FILENAME.asc
if: matrix.platform.build-id == 'linux+x86-64'
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pkgx"
description = "Run anything"
authors = ["Max Howell <[email protected]>", "Jacob Heider <[email protected]>"]
license = "Apache-2.0"
version = "2.1.0"
version = "2.1.1"
edition = "2021"
repository = "https://github.com/pkgxdev/pkgx"

Expand All @@ -14,7 +14,7 @@ regex = "1.11.1"
indicatif = "0.17.9"
nix = { version = "0.29.0", features = ["process"] }
serde_json = "1.0.135"
libpkgx = { version = "0.1.0", path = "../lib" }
libpkgx = { version = "0.1.1", path = "../lib" }
console = { version = "0.15", default-features = false, features = [
"ansi-parsing",
] }
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libpkgx"
description = "Install and run `pkgx` packages"
authors = ["Max Howell <[email protected]>", "Jacob Heider <[email protected]>"]
license = "Apache-2.0"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
repository = "https://github.com/pkgxdev/pkgx"

Expand Down
11 changes: 7 additions & 4 deletions scripts/publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ if [ "$(git rev-parse --abbrev-ref HEAD)" != main ]; then
fi

v_new=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "pkgx") | .version')
v_latest=$(gh release view --json tagName --jq .tagName)

case $(gh release view --json isDraft | jq .isDraft) in
'release not found')
case "$((gh release view v$v_new --json isDraft | jq .isDraft) 2>&1)" in
release\ not\ found)
gum confirm "prepare draft release for $v_new?" || exit 1
gh release create \
v$v_new \
--draft=true \
--prerelease=$is_prerelease \
--generate-notes \
--notes-start-tag=v$v_latest \
--notes-start-tag=$v_latest \
--title=v$v_new
;;
Expand All @@ -32,6 +32,9 @@ true)
false)
gum format "$v_new already published! edit \`./crates/cli/Cargo.toml\`"
exit 1;;
*)
echo 'unexpected exit result' >&2
exit 2;;
esac
git push origin main
Expand Down

0 comments on commit fddf5d9

Please sign in to comment.