From c6fda876a9c66b948ca9da9452c00c349b9243ca Mon Sep 17 00:00:00 2001 From: Rob Patro Date: Mon, 8 Jul 2024 19:52:33 -0400 Subject: [PATCH] custom source.tar.gz and add sha256 --- .github/workflows/release.yml | 9 ++------- Cargo.toml | 10 ++++++---- scripts/git-archive-all.sh | 6 ++++++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29f8880..a41298a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,8 @@ # title/body based on your changelogs. name: Release - permissions: - contents: write + "contents": "write" # This task will run whenever you push a git tag that looks like a version # like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc. @@ -62,7 +61,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.17.0/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.18.0/cargo-dist-installer.sh | sh" - name: Cache cargo-dist uses: actions/upload-artifact@v4 with: @@ -116,10 +115,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - uses: swatinem/rust-cache@v2 - with: - key: ${{ join(matrix.targets, '-') }} - cache-provider: ${{ matrix.cache_provider }} - name: Install cargo-dist run: ${{ matrix.install_dist }} # Get the dist-manifest diff --git a/Cargo.toml b/Cargo.toml index 0f7e844..be2e9e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "piscem" -version = "0.10.0" +version = "0.10.1" edition = "2021" build = "build.rs" repository = "https://github.com/COMBINE-lab/piscem" @@ -29,7 +29,7 @@ inherits = "release" # Config for 'cargo dist' [workspace.metadata.dist] # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.17.0" +cargo-dist-version = "0.18.0" # The installers to generate for each app installers = ["shell"] # Target platforms to build apps for (Rust target-triple syntax) @@ -42,6 +42,8 @@ ci = "github" pr-run-mode = "plan" # Whether to install an updater program install-updater = true +# Generate and dist a source tarball +source-tarball = false ## since this is cross-language and ## we are not including C++ debug ## symbols, this currently doesn't work @@ -50,8 +52,8 @@ install-updater = true # split-debuginfo = "packed" [[workspace.metadata.dist.extra-artifacts]] -artifacts = ["source_recursive.tar.gz"] -build = ["bash", "scripts/git-archive-all.sh", "--format", "tar.gz", "--prefix", "piscem/", "source_recursive.tar.gz"] +artifacts = ["source.tar.gz", "source.tar.gz.sha256"] +build = ["bash", "scripts/git-archive-all.sh", "--format", "tar.gz", "--prefix", "piscem/", "source.tar.gz"] [workspace.metadata.dist.github-custom-runners] aarch64-apple-darwin = "macos-14" diff --git a/scripts/git-archive-all.sh b/scripts/git-archive-all.sh index 0267411..54a0387 100644 --- a/scripts/git-archive-all.sh +++ b/scripts/git-archive-all.sh @@ -352,3 +352,9 @@ done < $TMPFILE if [ $VERBOSE -eq 1 ]; then echo "done" fi + +if [ $VERBOSE -eq 1 ]; then + echo "computing sha256 of the tarball" +fi +shasum -a 256 ${OUT_FILE} > ${OUT_FILE}.sha256 +