From 4bf02aebc202ec9dc49154a248937de7e42727a1 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 8 Dec 2021 15:52:55 +0100 Subject: [PATCH 01/22] Refactoring version bumping --- .github/workflows/version-bump.yml | 44 ++---------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index e7fe56c3..42c25ef4 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -11,47 +11,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} steps: - - name: checkout - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - name: bump - run: | - version=`grep -e '^version =' Cargo.toml | sed 's/version = //' | sed 's/"//g'` - major_version=`echo $version|grep -o -e '^[0-9]*'` - minor_version=`echo $version|grep -o -e '^[0-9]*.[0-9]*'|grep -o -e '[0-9]*$'` - patch_version=`echo $version|grep -o -e '[0-9]*$'` - git config user.email "<>" - git config user.name "Version autobump" - if git diff HEAD~ -- Cargo.toml | grep -q '^+version ='; then - echo 'Version has been bumped manually, bumping readme version and uploading to crates.io' - new_version=$major_version.$minor_version - sed -i "s/aleph-bft = \"\^[0-9]*.[0-9]*\"$/aleph-bft = \"^$new_version\"/" README.md - git add README.md - git commit --amend --no-edit - git push -f origin main - touch publishMe - exit 0 - fi - if [ -e `git diff HEAD~ -- src/` ]; then - echo 'No changes in code.' - exit 0 - fi - new_version=$major_version.$minor_version.$((patch_version + 1)) - sed -i "s/^version = \"$version\"$/version = \"$new_version\"/" Cargo.toml - git add Cargo.toml - git commit --amend --no-edit - git push -f origin main - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: credentials - uses: actions-rs/cargo@v1 - with: - command: login - args: ${{ secrets.CRATES_IO_TOKEN }} - name: publish run: | - if [ -f publishMe ]; then - cargo publish - fi + cargo publish + From 402b6b3886115eaad7a6ef1003798a4b632ef067 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Thu, 9 Dec 2021 09:42:45 +0100 Subject: [PATCH 02/22] Splitting version-bump job triggered on "push" to "main" into two jobs: 1) "prepare-new-version" triggereed on PR (open, reopen, synchronize); 2) "autobump" publishing new version to crates.io during push into main. --- .github/workflows/prepare-version-bump.yml | 58 ++++++++++++++++++++++ .github/workflows/version-bump.yml | 9 ++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/prepare-version-bump.yml diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml new file mode 100644 index 00000000..b23510ec --- /dev/null +++ b/.github/workflows/prepare-version-bump.yml @@ -0,0 +1,58 @@ +name: Autobump version + +on: + pull_request: + branches: + - main + +jobs: + prepare-new-version: + environment: Autobump version + runs-on: ubuntu-latest + # if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} + steps: + - name: cargo-next-install + run: | + cargo install cargo-next --locked + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: check-and-bump + run: | + old_version=`cargo next --get` + # If version on PR branch and main branch have no differences in version -> bump it. + # Set version in README.md, commit, tag and push to PR branch. + # Assuming nominal version for us is the one in the top level Cargo.toml. + if ! git diff ${{ github.head_ref }} ${{ github.base_ref }} -- Cargo.toml | grep -q '^+version ='; then + echo 'Version $old_version has NOT been changed manually between ${{ github.head_ref }} and ${{ github.base_ref }}, patching it now.' + cargo next --patch + new_version=`cargo next --get` + echo 'New version is $new_version.' + git add Cargo.toml + fi + new_version=`cargo next --get` + # Make sure README has the same version as Cargo.toml. + sed -i "s/^version = \"$version\"$/version = \"$new_version\"/" Cargo.toml + git add README.md + # Publishing changes to PR branch + git config user.email "<>" + git config user.name "Version autobump" + git commit -m "Setting version to $new_version" + git tag -a $new_version -m "Version $new_version created at PR ${{ github.base_ref }} -> ${{ github.head_ref }}" + - name: push-to-PR + run: | + git push origin ${{ github.head_ref }} + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: credentials + uses: actions-rs/cargo@v1 + with: + command: login + args: ${{ secrets.CRATES_IO_TOKEN }} + - name: publish + run: | + if [ -f publishMe ]; then + cargo publish + fi diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 42c25ef4..c978723f 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -11,7 +11,16 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} steps: + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: credentials + uses: actions-rs/cargo@v1 + with: + command: login + args: ${{ secrets.CRATES_IO_TOKEN }} - name: publish run: | + echo 'Uploading to crates.io' cargo publish From 7e0317217e0f2cc46f2c974fb9d6d1680f20a0b4 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Thu, 9 Dec 2021 09:46:27 +0100 Subject: [PATCH 03/22] AZ-219 splitting autobum into two files, in order to not using force pushes. --- .github/workflows/prepare-version-bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index b23510ec..6ff2560d 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -9,7 +9,7 @@ jobs: prepare-new-version: environment: Autobump version runs-on: ubuntu-latest - # if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} + # if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} #TODO: disabled for testing steps: - name: cargo-next-install run: | From 753cef5166bee592b5a458ff8874192fc7ab931f Mon Sep 17 00:00:00 2001 From: KazyCC Date: Thu, 9 Dec 2021 09:57:11 +0100 Subject: [PATCH 04/22] Temporary adding test_main branch handling for testing --- .github/workflows/prepare-version-bump.yml | 1 + .github/workflows/version-bump.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 6ff2560d..40297e36 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -4,6 +4,7 @@ on: pull_request: branches: - main + - test_main jobs: prepare-new-version: diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index c978723f..3ab6d9e9 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - test_main jobs: autobump: From 0d4ff1b912bed7f250c8d47370b6b930c618bca3 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Thu, 9 Dec 2021 09:59:24 +0100 Subject: [PATCH 05/22] Removing cargo publish from test_main branch testing --- .github/workflows/version-bump.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 3ab6d9e9..c978723f 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - test_main jobs: autobump: From 1f9b00770d79ba8358a6c350e920a0df5afbe558 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 10:49:15 +0100 Subject: [PATCH 06/22] Changing creates publish into manual workflow_dispatch --- .github/workflows/push-foundation-repo.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 698e8fd0..4bb32db6 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -1,11 +1,12 @@ name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo on: - workflow_run: - workflows: ["Autobump version"] - branches: [main] - types: - - completed + workflow_dispatch: +# workflow_run: +# workflows: ["Autobump version"] +# branches: [main] +# types: +# - completed jobs: sync: From 5ae61dbd613ad10e69366c3b9fda0917c3667db7 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 10:53:24 +0100 Subject: [PATCH 07/22] Simplfing the push command --- .github/workflows/prepare-version-bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 40297e36..c49d1323 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -43,7 +43,7 @@ jobs: git tag -a $new_version -m "Version $new_version created at PR ${{ github.base_ref }} -> ${{ github.head_ref }}" - name: push-to-PR run: | - git push origin ${{ github.head_ref }} + git push - uses: actions-rs/toolchain@v1 with: toolchain: stable From f6eb26d1b3187dc5ed2c6b38bb2a84619411d015 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 10:58:25 +0100 Subject: [PATCH 08/22] Prcising the checkout --- .github/workflows/prepare-version-bump.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index c49d1323..6e694837 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -19,6 +19,8 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 2 + ref: ${{ github.base_ref }} + token: ${{ secrets.SYNCAZF }} - name: check-and-bump run: | old_version=`cargo next --get` From de09bcf20145747f8371e3d6a672e229f02b04a2 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:04:56 +0100 Subject: [PATCH 09/22] Working on tokens for the checkout --- .github/workflows/push-foundation-repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 4bb32db6..938347ec 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -17,6 +17,6 @@ jobs: with: fetch-depth: 0 ref: "main" - token: ${{ secrets.SYNCAZF }} + token: ${{ secrets.SYNCAZF || secrets.MY_TOKEN || github.token }} - name: Push to Aleph-Zero-Foundation run: git push https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/AlephBFT.git From 91e51be4fa99ed133ca08b381595796eff6e3d88 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:08:36 +0100 Subject: [PATCH 10/22] Working on tokens for the checkout (2) --- .github/workflows/prepare-version-bump.yml | 2 +- .github/workflows/push-foundation-repo.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 6e694837..af77c215 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -20,7 +20,7 @@ jobs: with: fetch-depth: 2 ref: ${{ github.base_ref }} - token: ${{ secrets.SYNCAZF }} + token: ${{ secrets.SYNCAZF || secrets.MY_TOKEN || github.token }} - name: check-and-bump run: | old_version=`cargo next --get` diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 938347ec..4bb32db6 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -17,6 +17,6 @@ jobs: with: fetch-depth: 0 ref: "main" - token: ${{ secrets.SYNCAZF || secrets.MY_TOKEN || github.token }} + token: ${{ secrets.SYNCAZF }} - name: Push to Aleph-Zero-Foundation run: git push https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/AlephBFT.git From 9b29dadfc5c6cb853a494457fa96bea3259459ad Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:24:10 +0100 Subject: [PATCH 11/22] Cleanup of both version prep and autobump --- .github/workflows/prepare-version-bump.yml | 13 ------------- .github/workflows/push-foundation-repo.yml | 11 +++++++++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index af77c215..5cd3f1b0 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -46,16 +46,3 @@ jobs: - name: push-to-PR run: | git push - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: credentials - uses: actions-rs/cargo@v1 - with: - command: login - args: ${{ secrets.CRATES_IO_TOKEN }} - - name: publish - run: | - if [ -f publishMe ]; then - cargo publish - fi diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 4bb32db6..03d305cc 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -20,3 +20,14 @@ jobs: token: ${{ secrets.SYNCAZF }} - name: Push to Aleph-Zero-Foundation run: git push https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/AlephBFT.git + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: credentials + uses: actions-rs/cargo@v1 + with: + command: login + args: ${{ secrets.CRATES_IO_TOKEN }} + - name: publish + run: | + cargo publish From 85fde329e16e96e11f046a4fc67291927bdfa715 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:33:53 +0100 Subject: [PATCH 12/22] Cleanup of both version prep and autobump (2) --- .github/workflows/push-foundation-repo.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 03d305cc..edcf1d01 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -1,7 +1,11 @@ name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo on: + # NOTE: changed to "manual workflow dispatch" for now. + # TODO: To be automated again, when workflows stabilize + # and pushes to main origin will be forbidden. workflow_dispatch: + # workflow_run: # workflows: ["Autobump version"] # branches: [main] From 36e626386c52dc490515fcaf93f52eedb8e3a0c6 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:43:03 +0100 Subject: [PATCH 13/22] Switch to apply version of PR branch, not target branch. --- .github/workflows/prepare-version-bump.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 5cd3f1b0..6416461c 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -4,7 +4,7 @@ on: pull_request: branches: - main - - test_main + - test_main #TODO: disable jobs: prepare-new-version: @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 2 - ref: ${{ github.base_ref }} + ref: ${{ github.head_ref }} token: ${{ secrets.SYNCAZF || secrets.MY_TOKEN || github.token }} - name: check-and-bump run: | From 4ae86fa7f00c91d94c1506ca7d783169c8a1e8ba Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:48:54 +0100 Subject: [PATCH 14/22] Adding tags pushing --- .github/workflows/prepare-version-bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 6416461c..29116a17 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -45,4 +45,4 @@ jobs: git tag -a $new_version -m "Version $new_version created at PR ${{ github.base_ref }} -> ${{ github.head_ref }}" - name: push-to-PR run: | - git push + git push --follow-tags From a4367722a312e92d5999b0b1198c85853366ad90 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 11:50:39 +0100 Subject: [PATCH 15/22] Adding tags pushing --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 773a361b..55d59eff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "aleph-bft" -version = "0.8.0" +version = "0.8.1" dependencies = [ "async-trait", "bit-vec", From 624aad4275f80474dfe21350bcfcc1c100e26044 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 12:14:20 +0100 Subject: [PATCH 16/22] Adding check to do not try to create duplicate tags. --- .github/workflows/prepare-version-bump.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 29116a17..395b2ebc 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -42,7 +42,10 @@ jobs: git config user.email "<>" git config user.name "Version autobump" git commit -m "Setting version to $new_version" - git tag -a $new_version -m "Version $new_version created at PR ${{ github.base_ref }} -> ${{ github.head_ref }}" + # Create tag with version if it not exist. + if ! git rev-parse "$new_version" >/dev/null 2>&1; then + git tag -a $new_version -m "Version $new_version created at PR ${{ github.base_ref }} -> ${{ github.head_ref }}" + fi - name: push-to-PR run: | git push --follow-tags From c158f4a12810212543f472062014b7b7981cab00 Mon Sep 17 00:00:00 2001 From: Version autobump <> Date: Wed, 15 Dec 2021 10:36:05 +0000 Subject: [PATCH 17/22] Setting version to 0.8.3 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c2da0e47..f088906c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aleph-bft" -version = "0.8.2" +version = "0.8.3" edition = "2018" authors = ["Cardinal Cryptography"] categories = ["algorithms", "data-structures", "cryptography", "database"] From 56c03081937a9ef9db830baa232c8b5905cedb28 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 14:52:04 +0100 Subject: [PATCH 18/22] Cleanup before PR --- .github/workflows/prepare-version-bump.yml | 11 +++++------ Cargo.lock | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prepare-version-bump.yml b/.github/workflows/prepare-version-bump.yml index 395b2ebc..ee164603 100644 --- a/.github/workflows/prepare-version-bump.yml +++ b/.github/workflows/prepare-version-bump.yml @@ -1,16 +1,15 @@ -name: Autobump version +name: Autobump version on PR on: pull_request: branches: - main - - test_main #TODO: disable jobs: prepare-new-version: environment: Autobump version runs-on: ubuntu-latest - # if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} #TODO: disabled for testing + if: ${{ github.repository == 'Cardinal-Cryptography/AlephBFT'}} steps: - name: cargo-next-install run: | @@ -28,10 +27,10 @@ jobs: # Set version in README.md, commit, tag and push to PR branch. # Assuming nominal version for us is the one in the top level Cargo.toml. if ! git diff ${{ github.head_ref }} ${{ github.base_ref }} -- Cargo.toml | grep -q '^+version ='; then - echo 'Version $old_version has NOT been changed manually between ${{ github.head_ref }} and ${{ github.base_ref }}, patching it now.' + echo "Version $old_version has NOT been changed manually between ${{ github.head_ref }} and ${{ github.base_ref }}, patching it now." cargo next --patch new_version=`cargo next --get` - echo 'New version is $new_version.' + echo "New version is $new_version." git add Cargo.toml fi new_version=`cargo next --get` @@ -44,7 +43,7 @@ jobs: git commit -m "Setting version to $new_version" # Create tag with version if it not exist. if ! git rev-parse "$new_version" >/dev/null 2>&1; then - git tag -a $new_version -m "Version $new_version created at PR ${{ github.base_ref }} -> ${{ github.head_ref }}" + git tag -a $new_version -m "Version $new_version created at PR ${{ github.head_ref }} -> ${{ github.base_ref }}" fi - name: push-to-PR run: | diff --git a/Cargo.lock b/Cargo.lock index 55d59eff..a7f6e711 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "aleph-bft" -version = "0.8.1" +version = "0.8.2" dependencies = [ "async-trait", "bit-vec", From 708aa43874d1386fa2f24c8a48947d4f62517503 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 14:53:21 +0100 Subject: [PATCH 19/22] Renaming --- .github/workflows/push-foundation-repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index edcf1d01..3aa82ebc 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -1,4 +1,4 @@ -name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo +name: Publish AlephBFT main to crates.io. on: # NOTE: changed to "manual workflow dispatch" for now. From b8df6b4a260e0b9e50c269c557008df14349966f Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 15:05:14 +0100 Subject: [PATCH 20/22] Cargo.lock version update --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index a7f6e711..c2aa0602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "aleph-bft" -version = "0.8.2" +version = "0.8.3" dependencies = [ "async-trait", "bit-vec", From dc09229104f04832003691e81642f0a553dbd8b9 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Wed, 15 Dec 2021 16:37:46 +0100 Subject: [PATCH 21/22] Improving name to clearly state purpose. --- .github/workflows/push-foundation-repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 3aa82ebc..7afabd08 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -1,4 +1,4 @@ -name: Publish AlephBFT main to crates.io. +name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo and publishes AlephBFT main to crates.io. on: # NOTE: changed to "manual workflow dispatch" for now. From 4339e937ed9e0d042ad45d0899ecfc9feea3c0b6 Mon Sep 17 00:00:00 2001 From: KazyCC Date: Thu, 16 Dec 2021 11:12:36 +0100 Subject: [PATCH 22/22] Resolving PR comments --- .github/workflows/push-foundation-repo.yml | 28 +++++----------------- .github/workflows/version-bump.yml | 12 +++++++--- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 7afabd08..400f1750 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -1,16 +1,11 @@ -name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo and publishes AlephBFT main to crates.io. +name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo. on: - # NOTE: changed to "manual workflow dispatch" for now. - # TODO: To be automated again, when workflows stabilize - # and pushes to main origin will be forbidden. - workflow_dispatch: - -# workflow_run: -# workflows: ["Autobump version"] -# branches: [main] -# types: -# - completed + workflow_run: + workflows: ["Autobump version"] + branches: [main] + types: + - completed jobs: sync: @@ -24,14 +19,3 @@ jobs: token: ${{ secrets.SYNCAZF }} - name: Push to Aleph-Zero-Foundation run: git push https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/AlephBFT.git - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: credentials - uses: actions-rs/cargo@v1 - with: - command: login - args: ${{ secrets.CRATES_IO_TOKEN }} - - name: publish - run: | - cargo publish diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index c978723f..fa533d94 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -1,9 +1,15 @@ name: Autobump version on: - push: - branches: - - main + workflow_dispatch: + # NOTE: changed to "manual workflow dispatch" for now. + # TODO: To be automated again, when workflows stabilize + # and pushes to main origin will be forbidden. + # push: + # branches: + # - main + + jobs: autobump: