mirror of
https://github.com/zama-ai/concrete.git
synced 2026-01-10 05:18:00 -05:00
fix(ci): use correct path for the crate
This commit is contained in:
@@ -14,6 +14,7 @@ env:
|
||||
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
|
||||
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }}
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
CRATE_BASE_DIR: 'frontends/concrete-rust/concrete-keygen/'
|
||||
|
||||
permissions: {}
|
||||
|
||||
@@ -31,15 +32,15 @@ jobs:
|
||||
- name: Prepare package
|
||||
run: |
|
||||
sudo apt install -y capnproto libcapnp-dev
|
||||
cd frontends/concrete-rust/concrete-keygen/
|
||||
cd ${{ env.CRATE_BASE_DIR }}
|
||||
cargo package --features="wasm"
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: crate
|
||||
path: target/package/*.crate
|
||||
name: concrete-keygen
|
||||
path: ${{ env.CRATE_BASE_DIR }}/target/package/*.crate
|
||||
- name: generate hash
|
||||
id: hash
|
||||
run: cd target/package && echo "hash=$(sha256sum ./*.crate | base64 -w0)" >> "${GITHUB_OUTPUT}"
|
||||
run: cd ${{ env.CRATE_BASE_DIR }}/target/package && echo "hash=$(sha256sum ./*.crate | base64 -w0)" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
provenance:
|
||||
if: ${{ !inputs.dry_run }}
|
||||
@@ -68,7 +69,7 @@ jobs:
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: 'false'
|
||||
persist-credentials: 'true'
|
||||
|
||||
- name: Publish crate.io package
|
||||
env:
|
||||
@@ -76,6 +77,7 @@ jobs:
|
||||
DRY_RUN: ${{ inputs.dry_run && '--dry-run' || '' }}
|
||||
run: |
|
||||
sudo apt install -y capnproto libcapnp-dev
|
||||
cd ${{ env.CRATE_BASE_DIR }}
|
||||
# DRY_RUN expansion cannot be double quoted when variable contains empty string otherwise cargo publish
|
||||
# would fail. This is safe since DRY_RUN is handled in the env section above.
|
||||
# shellcheck disable=SC2086
|
||||
@@ -96,13 +98,13 @@ jobs:
|
||||
gh release create --draft --repo ${{ github.repository }} \
|
||||
--verify-tag "${TAG}" \
|
||||
--title "${TAG}" \
|
||||
target/package/*.crate
|
||||
${{ env.CRATE_BASE_DIR }}/target/package/*.crate
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Generate hash
|
||||
id: published_hash
|
||||
run: cd target/package && echo "pub_hash=$(sha256sum ./*.crate | base64 -w0)" >> "${GITHUB_OUTPUT}"
|
||||
run: cd ${{ env.CRATE_BASE_DIR }}/target/package && echo "pub_hash=$(sha256sum ./*.crate | base64 -w0)" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Slack notification (hashes comparison)
|
||||
if: ${{ needs.package.outputs.hash != steps.published_hash.outputs.pub_hash }}
|
||||
|
||||
Reference in New Issue
Block a user