Skip to content

Commit

Permalink
ci: build and sign
Browse files Browse the repository at this point in the history
Signed-off-by: moabu <[email protected]>
  • Loading branch information
moabu committed Jan 16, 2025
1 parent eff77c0 commit 30e1908
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,18 @@ jobs:
cargo install wasm-pack
wasm-pack build --release --target web
ls pkg
#- name: Generate sha256sum and sign
# id: sign-cedarling
# working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_wasm
# run: |
# TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
# VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
# if [ "${TAG}" == "nightly" ]; then
# VERSION=nightly
# TAG="0.0.0"
# fi
# cd ${{ github.workspace }}/jans-cedarling/target/wheels
# echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
# gh release upload "${VERSION}" *.whl *.sha256sum *.asc
- name: Archive and sign pkg contents
id: archive_pkg
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_wasm
run: |
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3 | sed 's/^v//')
VERSION="$(echo ${{ github.event.ref }} | cut -d '/' -f 3)"
if [ "${TAG}" == "nightly" ]; then
VERSION=nightly
TAG="0.0.0"
fi
tar -czvf cedarling_wasm_"${TAG}"_pkg.tar.gz -C pkg .
sha256sum cedarling_wasm_"${TAG}"_pkg.tar.gz > cedarling_wasm_"${TAG}"_pkg.tar.gz.sha256sum
gpg --armor --detach-sign cedarling_wasm_"${TAG}"_pkg.tar.gz || echo "Failed to sign"
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
gh release upload "${VERSION}" *.tar.gz *.sha256sum *.asc

0 comments on commit 30e1908

Please sign in to comment.