Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create checksums of the downloadable artifacts for core #428

Merged
merged 7 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/build-nym-vpn-core-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: build-nym-vpn-core-linux
on: [workflow_dispatch, workflow_call]
on:
workflow_dispatch:
workflow_call:
outputs:
RUST_VERSION:
value: ${{ jobs.build-linux.outputs.RUST_VERSION }}

env:
CARGO_TERM_COLOR: always
Expand All @@ -17,8 +22,7 @@ jobs:
runs-on: ubuntu-22.04-arc
outputs:
UPLOAD_DIR_LINUX: ${{ env.UPLOAD_DIR_LINUX }}
RUST_VERSION:
value: ${{ jobs.build-linux.outputs.RUST_VERSION }}
RUST_VERSION: ${{ steps.rust-version.outputs.rustc }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/generate-build-info-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
run:
echo "date=$(date)" >> $GITHUB_OUTPUT

- name: Install rust toolchain
uses: brndnmtthws/rust-action-rustup@v1

- name: Get package version cli
id: package-version-cli
uses: nicolaiunrein/cargo-get@master
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/publish-nym-vpn-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
build-nym-vpn-core-mac:
uses: ./.github/workflows/build-nym-vpn-core-mac.yml


generate-build-info-core:
uses: ./.github/workflows/generate-build-info-core.yml
needs: build-nym-vpn-core-linux
Expand All @@ -36,7 +35,7 @@ jobs:
needs:
- build-nym-vpn-core-linux
- build-nym-vpn-core-mac
- generate-build-info
- generate-build-info-core
runs-on: ubuntu-22.04-arc
permissions:
contents: write
Expand Down Expand Up @@ -106,19 +105,6 @@ jobs:

- name: Generate checksum and tar folder per platform
run: |
for f in ${{ env.UPLOAD_DIR_LINUX }}/*; do
sha256sum ${f} > "${f}.sha256sum"
done
echo 'SHA256_CHECKSUMS<<EOF' >> $GITHUB_ENV
cat ${{ env.UPLOAD_DIR_LINUX }}/*.sha256sum >> $GITHUB_ENV

for f in ${{ env.UPLOAD_DIR_MAC }}/*; do
sha256sum ${f} > "${f}.sha256sum"
done
echo 'SHA256_CHECKSUMS<<EOF' >> $GITHUB_ENV
cat ${{ env.UPLOAD_DIR_MAC }}/*.sha256sum >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV

ARCHIVE_LINUX=nym-vpn-core-v${{ steps.package-version-lib.outputs.metadata }}_linux_x86_64
ARCHIVE_MAC=nym-vpn-core-v${{ steps.package-version-lib.outputs.metadata }}_macos_aarch64
echo "ARCHIVE_LINUX=${ARCHIVE_LINUX}" >> $GITHUB_ENV
Expand All @@ -130,6 +116,13 @@ jobs:
tar cvzf ${ARCHIVE_LINUX}.tar.gz ${ARCHIVE_LINUX}
tar cvzf ${ARCHIVE_MAC}.tar.gz ${ARCHIVE_MAC}

sha256sum ${ARCHIVE_LINUX}.tar.gz > "${ARCHIVE_LINUX}.tar.gz.sha256sum"
sha256sum ${ARCHIVE_MAC}.tar.gz > "${ARCHIVE_MAC}.tar.gz.sha256sum"
echo 'SHA256_CHECKSUMS<<EOF' >> $GITHUB_ENV
cat ${ARCHIVE_LINUX}.tar.gz.sha256sum >> $GITHUB_ENV
cat ${ARCHIVE_MAC}.tar.gz.sha256sum >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV

- name: Setting subject, prerelease and notes files
if: ${{ contains(env.TAG_NAME, 'nightly') }}
run: |
Expand All @@ -139,8 +132,6 @@ jobs:
gh release delete nightly --yes || true
git push origin :nightly || true

# Once we consider these actually release builds, remove --prerelease
# from PRERELEASE here
- name: Removing --prerelease if needed
if: ${{ !contains(env.TAG_NAME, 'nightly') }}
run: |
Expand All @@ -157,7 +148,7 @@ jobs:
- name: Publish release
run: |
envsubst < "$GITHUB_WORKSPACE/.github/workflows/$NOTES_FILE" > "$RUNNER_TEMP/release-notes.md"
gh release create $TAG_NAME ${{ env.PRERELEASE }} --notes-file "$RUNNER_TEMP/release-notes.md" --title "$SUBJECT" --target $GITHUB_SHA ${{ env.ARCHIVE_LINUX }}.tar.gz ${{ env.ARCHIVE_MAC }}.tar.gz
gh release create $TAG_NAME ${{ env.PRERELEASE }} --notes-file "$RUNNER_TEMP/release-notes.md" --title "$SUBJECT" --target $GITHUB_SHA ${{ env.ARCHIVE_LINUX }}.tar.gz ${{ env.ARCHIVE_LINUX }}.tar.gz.sha256sum ${{ env.ARCHIVE_MAC }}.tar.gz ${{ env.ARCHIVE_MAC }}.tar.gz.sha256sum

gen-hashes:
uses: ./.github/workflows/gen-hashes-json.yml
Expand Down
Loading