From ac4824693fd46cbed794b47ed7334bbfdfa73af4 Mon Sep 17 00:00:00 2001 From: mikewcasale Date: Wed, 26 Jul 2023 04:10:25 -0700 Subject: [PATCH 01/16] Update release-and-pypi-publish.yml --- .../workflows/release-and-pypi-publish.yml | 213 ++++-------------- 1 file changed, 49 insertions(+), 164 deletions(-) diff --git a/.github/workflows/release-and-pypi-publish.yml b/.github/workflows/release-and-pypi-publish.yml index e688c2f05..07ebdceab 100644 --- a/.github/workflows/release-and-pypi-publish.yml +++ b/.github/workflows/release-and-pypi-publish.yml @@ -30,13 +30,18 @@ on: - main jobs: - check_commit: + combined_job: runs-on: ubuntu-latest outputs: - skip: ${{ steps.check.outputs.skip }} + version: ${{ steps.bump_version_and_set_output.outputs.new_version }} + changelog: ${{ steps.generate.outputs.changelog }} + version_changes: ${{ steps.extract_changes.outputs.version_changes }} steps: + # Checkout - name: Checkout code uses: actions/checkout@v2 + + # Check commit message - id: check run: | MESSAGE=$(git log -1 --pretty=%B) @@ -45,29 +50,31 @@ jobs: else echo "::set-output name=skip::false" fi - bump_version: - runs-on: ubuntu-latest - needs: check_commit - if: needs.check_commit.outputs.skip != 'true' - outputs: - version: ${{ steps.bump_version_and_set_output.outputs.new_version }} - steps: - - name: Checkout code - uses: actions/checkout@v2 + + # If commit message doesn't contain "[skip ci]", continue to the next steps - name: Set up Python + if: steps.check.outputs.skip != 'true' uses: actions/setup-python@v2 with: python-version: 3.9 + - uses: actions/setup-node@v3 + if: steps.check.outputs.skip != 'true' with: node-version: 16 + - name: Install Ganesh-CLI + if: steps.check.outputs.skip != 'true' run: npm install -g ganache + - name: Install Dependencies + if: steps.check.outputs.skip != 'true' run: | python -m pip install --upgrade pip pip install -r requirements.txt --force-reinstall + - name: Setup Brownie + if: steps.check.outputs.skip != 'true' run: | brownie networks import ./brownie-config.yaml true brownie networks delete mainnet @@ -77,9 +84,13 @@ jobs: TENDERLY_FORK: '${{ secrets.TENDERLY_FORK }}' WEB3_ALCHEMY_PROJECT_ID: '${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}' ETHERSCAN_TOKEN: '${{ secrets.ETHERSCAN_TOKEN }}' + - name: Install bumpversion + if: steps.check.outputs.skip != 'true' run: pip install bumpversion + - name: Bump version and set output + if: steps.check.outputs.skip != 'true' id: bump_version_and_set_output run: | CURRENT_VERSION=$(python -c "import fastlane_bot; print(fastlane_bot.__version__)") @@ -94,33 +105,9 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -m "Bump version [skip ci]" -a - - name: Push changes - run: | - git config --global push.autoSetupRemote true - git push origin $BRANCH_NAME - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Create Pull Request - id: create_pull_request - run: | - gh pr create --title "Bump version [skip ci]" --body "Automatic version bump" --head "$BRANCH_NAME" --base "main" > pr.txt - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Merge pull request - run: | - PR_URL=$(cat pr.txt) - PR_NUMBER=$(echo $PR_URL | awk -F'/' '{print $NF}') - gh pr merge $PR_NUMBER --admin --merge - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - generate_changelog: - if: needs.check_commit.outputs.skip != 'true' - needs: [ bump_version,check_commit ] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + - name: Generate changelog + if: steps.check.outputs.skip != 'true' uses: heinrichreimer/github-changelog-generator-action@v2.3 with: token: ${{ secrets.GH_TOKEN }} @@ -132,154 +119,52 @@ jobs: prLabel: 'Merged pull requests' compareLink: true addSections: '{"Security fixes": {"labels": ["security"]}, "Breaking changes": {"labels": ["breaking"]}}' - - name: Create branch for changelog update - run: | - BRANCH_NAME="update-changelog-${{ github.run_number }}" - git checkout -b $BRANCH_NAME - - name: Commit and push changelog update + + - name: Commit changelog update + if: steps.check.outputs.skip != 'true' run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git config --global push.autoSetupRemote true git add CHANGELOG.md - git commit -m "Bump version [skip ci]" - git push origin HEAD - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Create Pull Request for changelog update - run: | - gh pr create --title "Bump version [skip ci]" --body "Automatic update of CHANGELOG.md" --head "$(git rev-parse --abbrev-ref HEAD)" --base "main" > pr.txt - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Merge pull request - run: | - PR_URL=$(cat pr.txt) - PR_NUMBER=$(echo $PR_URL | awk -F'/' '{print $NF}') - gh pr merge $PR_NUMBER --admin --merge - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - clean_changelog: - needs: [generate_changelog,check_commit] - if: needs.check_commit.outputs.skip != 'true' - runs-on: ubuntu-latest - outputs: - changelog: ${{ steps.generate.outputs.changelog }} - steps: - - name: Checkout - uses: actions/checkout@v2 + git commit -m "Update changelog [skip ci]" + - name: Clean changelog + if: steps.check.outputs.skip != 'true' run: | - sed -i '/Bump version/d' CHANGELOG.md - - name: Create branch for changelog cleaning - run: | - BRANCH_NAME="clean-changelog-${{ github.run_number }}" - git checkout -b $BRANCH_NAME - - name: Commit and push changelog cleaning + sed -i '/[skip ci]/d' CHANGELOG.md + + - name: Commit changelog cleaning + if: steps.check.outputs.skip != 'true' run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git config --global push.autoSetupRemote true git add CHANGELOG.md - git commit -m "Bump version [skip ci]" - git push origin HEAD - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Create Pull Request for changelog cleaning - run: | - gh pr create --title "Bump version [skip ci]" --body "Automatic cleaning of CHANGELOG.md" --head "$(git rev-parse --abbrev-ref HEAD)" --base "main" > pr.txt - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Merge pull request - run: | - PR_URL=$(cat pr.txt) - PR_NUMBER=$(echo $PR_URL | awk -F'/' '{print $NF}') - gh pr merge $PR_NUMBER --admin --merge - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - release: - needs: [ bump_version,check_commit,generate_changelog,clean_changelog ] - if: needs.check_commit.outputs.skip != 'true' - runs-on: ubuntu-latest - outputs: - version_changes: ${{ steps.extract_changes.outputs.version_changes }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 + git commit -m "Clean changelog [skip ci]" + - name: Extract version changes from CHANGELOG.md + if: steps.check.outputs.skip != 'true' id: extract_changes run: | - VERSION_CHANGES=$(sed -n "/\[v${{ needs.bump_version.outputs.version }}\]/,/\[v.*\]/p" CHANGELOG.md | head -n -2) + VERSION_CHANGES=$(sed -n "/\[v${{ steps.bump_version_and_set_output.outputs.new_version }}\]/,/\[v.*\]/p" CHANGELOG.md | head -n -2) echo "::set-output name=version_changes::$VERSION_CHANGES" + - name: Create Release + if: steps.check.outputs.skip != 'true' id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: - tag_name: v${{ needs.bump_version.outputs.version }} - release_name: Release v${{ needs.bump_version.outputs.version }} + tag_name: v${{ steps.bump_version_and_set_output.outputs.new_version }} + release_name: Release v${{ steps.bump_version_and_set_output.outputs.new_version }} body: ${{ steps.extract_changes.outputs.version_changes }} draft: false prerelease: false - publish: - if: needs.check_commit.outputs.skip != 'true' - needs: [release,check_commit] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Install Ganesh-CLI - run: npm install -g ganache - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt --force-reinstall - - name: Setup Brownie - run: | - brownie networks import ./brownie-config.yaml true - brownie networks delete mainnet - brownie networks add "Ethereum Mainnet" "mainnet" host="https://eth-mainnet.alchemyapi.io/v2/$WEB3_ALCHEMY_PROJECT_ID" chainid=1 - brownie networks set_provider alchemy - env: - TENDERLY_FORK: '${{ secrets.TENDERLY_FORK }}' - WEB3_ALCHEMY_PROJECT_ID: '${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}' - ETHERSCAN_TOKEN: '${{ secrets.ETHERSCAN_TOKEN }}' - - name: Create .env file - run: | - echo TENDERLY_FORK=$TENDERLY_FORK > .env - echo WEB3_ALCHEMY_PROJECT_ID=$WEB3_ALCHEMY_PROJECT_ID >> .env - echo ETHERSCAN_TOKEN=$ETHERSCAN_TOKEN >> .env - echo DEFAULT_MIN_PROFIT_BNT=$DEFAULT_MIN_PROFIT_BNT >> .env - echo ETH_PRIVATE_KEY_BE_CAREFUL=$ETH_PRIVATE_KEY_BE_CAREFUL >> .env - echo TENDERLY_FORK_ID=$TENDERLY_FORK_ID >> .env - env: - TENDERLY_FORK: '${{ secrets.TENDERLY_FORK }}' - TENDERLY_FORK_ID: '${{ secrets.TENDERLY_FORK }}' - WEB3_ALCHEMY_PROJECT_ID: '${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}' - ETHERSCAN_TOKEN: '${{ secrets.ETHERSCAN_TOKEN }}' - DEFAULT_MIN_PROFIT_BNT: '${{ secrets.DEFAULT_MIN_PROFIT_BNT }}' - ETH_PRIVATE_KEY_BE_CAREFUL: '${{ secrets.ETH_PRIVATE_KEY_BE_CAREFUL }}' - - name: Install package - run: | - python setup.py install - - name: Build package - run: python setup.py sdist - - name: Build wheel - run: | - pip install wheel - python setup.py bdist_wheel - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + + # Final step, push to main branch using CasperWA/push-protected@v2 action + - name: Push to protected branch + if: steps.check.outputs.skip != 'true' + uses: CasperWA/push-protected@v2 with: - password: ${{ secrets.FASTLANE_PYPI_API_TOKEN }} - repository-url: https://upload.pypi.org/legacy/ \ No newline at end of file + token: ${{ secrets.GH_TOKEN }} + branch: main From e0a0b7baebe7008fe258dd92ce2c1fda3d37f2d8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:39:29 +0000 Subject: [PATCH 02/16] Bump version [skip ci] --- fastlane_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index 1ea0a1b30..ff5c42abe 100644 --- a/fastlane_bot/__init__.py +++ b/fastlane_bot/__init__.py @@ -1,7 +1,7 @@ from .bot import CarbonBot as Bot, __VERSION__, __DATE__ from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider -__version__ = '2.3.0' +__version__ = '2.4.0' From dd6ccf7300e4026980a3a29935cb6cf229553ef3 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:39:33 +0000 Subject: [PATCH 03/16] Update changelog [skip ci] --- CHANGELOG.md | 60 +++------------------------------------------------- 1 file changed, 3 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d93d42ef..fc4bd17b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,66 +1,12 @@ # Changelog -## [Unreleased](https://github.com/bancorprotocol/fastlane-bot/tree/HEAD) +## [Unreleased](https://github.com/mikewcasale/fastlane-bot/tree/HEAD) -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725g...HEAD) +[Full Changelog](https://github.com/mikewcasale/fastlane-bot/compare/8ba1c6eebf13a8ff8e550cb28ea86e7e286e4e43...HEAD) Merged pull requests -- Bump version \[skip ci\] [\#20](https://github.com/bancorprotocol/fastlane-bot/pull/20) ([bancor-services](https://github.com/bancor-services)) -- updating DEFAULT\_MIN\_PROFIT\_BNT to 1 [\#19](https://github.com/bancorprotocol/fastlane-bot/pull/19) ([mikewcasale](https://github.com/mikewcasale)) - -## [main_skl_flbot_20230725g](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725g) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725f...main_skl_flbot_20230725g) - -## [main_skl_flbot_20230725f](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725f) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725e...main_skl_flbot_20230725f) - -## [main_skl_flbot_20230725e](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725e) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725d...main_skl_flbot_20230725e) - -## [main_skl_flbot_20230725d](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725d) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725c...main_skl_flbot_20230725d) - -## [main_skl_flbot_20230725c](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725c) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725b...main_skl_flbot_20230725c) - -## [main_skl_flbot_20230725b](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725b) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725...main_skl_flbot_20230725b) - -## [main_skl_flbot_20230725](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725) (2023-07-25) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.1.0...main_skl_flbot_20230725) - -## [v2.1.0](https://github.com/bancorprotocol/fastlane-bot/tree/v2.1.0) (2023-07-24) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v1.0...v2.1.0) - -Merged pull requests - -- Bump version \[skip ci\] [\#15](https://github.com/bancorprotocol/fastlane-bot/pull/15) ([bancor-services](https://github.com/bancor-services)) -- Bump version \[skip ci\] [\#14](https://github.com/bancorprotocol/fastlane-bot/pull/14) ([bancor-services](https://github.com/bancor-services)) - -## [v1.0](https://github.com/bancorprotocol/fastlane-bot/tree/v1.0) (2023-05-23) - -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/8ba1c6eebf13a8ff8e550cb28ea86e7e286e4e43...v1.0) - -Merged pull requests - -- Feature/read reward settings from arb contract [\#10](https://github.com/bancorprotocol/fastlane-bot/pull/10) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- Fix typo in readme [\#9](https://github.com/bancorprotocol/fastlane-bot/pull/9) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- update arb function name [\#8](https://github.com/bancorprotocol/fastlane-bot/pull/8) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- Update contract ABI [\#7](https://github.com/bancorprotocol/fastlane-bot/pull/7) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- Feature/contract upgrade [\#6](https://github.com/bancorprotocol/fastlane-bot/pull/6) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- Feature/private transactions [\#4](https://github.com/bancorprotocol/fastlane-bot/pull/4) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- Bugfix/collection path [\#3](https://github.com/bancorprotocol/fastlane-bot/pull/3) ([Lesigh-3100](https://github.com/Lesigh-3100)) -- Dev [\#2](https://github.com/bancorprotocol/fastlane-bot/pull/2) ([mikewcasale](https://github.com/mikewcasale)) -- Dev [\#1](https://github.com/bancorprotocol/fastlane-bot/pull/1) ([mikewcasale](https://github.com/mikewcasale)) +- Update release-and-pypi-publish.yml [\#1](https://github.com/mikewcasale/fastlane-bot/pull/1) ([mikewcasale](https://github.com/mikewcasale)) From c9f4129bba7d56a631ff2b95eb533187fa5e449c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:39:33 +0000 Subject: [PATCH 04/16] Clean changelog [skip ci] --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4bd17b9..9e5f5f8a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,7 @@ -# Changelog -## [Unreleased](https://github.com/mikewcasale/fastlane-bot/tree/HEAD) -[Full Changelog](https://github.com/mikewcasale/fastlane-bot/compare/8ba1c6eebf13a8ff8e550cb28ea86e7e286e4e43...HEAD) -Merged pull requests -- Update release-and-pypi-publish.yml [\#1](https://github.com/mikewcasale/fastlane-bot/pull/1) ([mikewcasale](https://github.com/mikewcasale)) -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 32cff8eeccbb7aca9add6f6fc35e78c679336179 Mon Sep 17 00:00:00 2001 From: mikewcasale Date: Wed, 26 Jul 2023 04:47:03 -0700 Subject: [PATCH 05/16] Update release-and-pypi-publish.yml --- .github/workflows/release-and-pypi-publish.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-and-pypi-publish.yml b/.github/workflows/release-and-pypi-publish.yml index 07ebdceab..87a0c2bc8 100644 --- a/.github/workflows/release-and-pypi-publish.yml +++ b/.github/workflows/release-and-pypi-publish.yml @@ -141,12 +141,12 @@ jobs: git add CHANGELOG.md git commit -m "Clean changelog [skip ci]" - - name: Extract version changes from CHANGELOG.md - if: steps.check.outputs.skip != 'true' - id: extract_changes - run: | - VERSION_CHANGES=$(sed -n "/\[v${{ steps.bump_version_and_set_output.outputs.new_version }}\]/,/\[v.*\]/p" CHANGELOG.md | head -n -2) - echo "::set-output name=version_changes::$VERSION_CHANGES" +# - name: Extract version changes from CHANGELOG.md +# if: steps.check.outputs.skip != 'true' +# id: extract_changes +# run: | +# VERSION_CHANGES=$(sed -n "/\[v${{ steps.bump_version_and_set_output.outputs.new_version }}\]/,/\[v.*\]/p" CHANGELOG.md | head -n -2) +# echo "::set-output name=version_changes::$VERSION_CHANGES" - name: Create Release if: steps.check.outputs.skip != 'true' From d67e0b34c15222b179782b7c9a9e377a78f51d4e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:51:13 +0000 Subject: [PATCH 06/16] Bump version [skip ci] --- fastlane_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index ff5c42abe..e280bb7a2 100644 --- a/fastlane_bot/__init__.py +++ b/fastlane_bot/__init__.py @@ -1,7 +1,7 @@ from .bot import CarbonBot as Bot, __VERSION__, __DATE__ from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider -__version__ = '2.4.0' +__version__ = '2.5.0' From 203e4db5aedbd4b40ce052bb2c1732aa51611c6c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:51:16 +0000 Subject: [PATCH 07/16] Update changelog [skip ci] --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e5f5f8a4..fc3174bbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,21 @@ +# Changelog +## [Unreleased](https://github.com/mikewcasale/fastlane-bot/tree/HEAD) +[Full Changelog](https://github.com/mikewcasale/fastlane-bot/compare/v2.4.0...HEAD) +Merged pull requests +- Update release-and-pypi-publish.yml [\#2](https://github.com/mikewcasale/fastlane-bot/pull/2) ([mikewcasale](https://github.com/mikewcasale)) +## [v2.4.0](https://github.com/mikewcasale/fastlane-bot/tree/v2.4.0) (2023-07-26) +[Full Changelog](https://github.com/mikewcasale/fastlane-bot/compare/8ba1c6eebf13a8ff8e550cb28ea86e7e286e4e43...v2.4.0) +Merged pull requests + +- Update release-and-pypi-publish.yml [\#1](https://github.com/mikewcasale/fastlane-bot/pull/1) ([mikewcasale](https://github.com/mikewcasale)) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 2d58ffabecfff15075bde3f901700b67fcc9c26e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:51:16 +0000 Subject: [PATCH 08/16] Clean changelog [skip ci] --- CHANGELOG.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3174bbd..1dac6def4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,11 @@ -# Changelog -## [Unreleased](https://github.com/mikewcasale/fastlane-bot/tree/HEAD) -[Full Changelog](https://github.com/mikewcasale/fastlane-bot/compare/v2.4.0...HEAD) -Merged pull requests -- Update release-and-pypi-publish.yml [\#2](https://github.com/mikewcasale/fastlane-bot/pull/2) ([mikewcasale](https://github.com/mikewcasale)) -## [v2.4.0](https://github.com/mikewcasale/fastlane-bot/tree/v2.4.0) (2023-07-26) -[Full Changelog](https://github.com/mikewcasale/fastlane-bot/compare/8ba1c6eebf13a8ff8e550cb28ea86e7e286e4e43...v2.4.0) -Merged pull requests -- Update release-and-pypi-publish.yml [\#1](https://github.com/mikewcasale/fastlane-bot/pull/1) ([mikewcasale](https://github.com/mikewcasale)) -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From 96c9ffcb2471da944dd18095dabd5fb447c23645 Mon Sep 17 00:00:00 2001 From: mikewcasale Date: Wed, 26 Jul 2023 04:55:19 -0700 Subject: [PATCH 09/16] Simplified changelog actions --- .../workflows/release-and-pypi-publish.yml | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-and-pypi-publish.yml b/.github/workflows/release-and-pypi-publish.yml index 87a0c2bc8..e612c4dc1 100644 --- a/.github/workflows/release-and-pypi-publish.yml +++ b/.github/workflows/release-and-pypi-publish.yml @@ -125,21 +125,26 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" + sed -i '/[skip ci]/d' CHANGELOG.md git add CHANGELOG.md git commit -m "Update changelog [skip ci]" - - name: Clean changelog - if: steps.check.outputs.skip != 'true' - run: | - sed -i '/[skip ci]/d' CHANGELOG.md +# - name: Clean changelog +# if: steps.check.outputs.skip != 'true' +# run: | +# git config --local user.email "action@github.com" +# git config --local user.name "GitHub Action" +# sed -i '/[skip ci]/d' CHANGELOG.md +# git add CHANGELOG.md +# git commit -m "Clean changelog [skip ci]" - - name: Commit changelog cleaning - if: steps.check.outputs.skip != 'true' - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add CHANGELOG.md - git commit -m "Clean changelog [skip ci]" +# - name: Commit changelog cleaning +# if: steps.check.outputs.skip != 'true' +# run: | +# git config --local user.email "action@github.com" +# git config --local user.name "GitHub Action" +# git add CHANGELOG.md +# git commit -m "Clean changelog [skip ci]" # - name: Extract version changes from CHANGELOG.md # if: steps.check.outputs.skip != 'true' From 5774478ecc829abd12f26793c075103e0ca54f23 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:58:03 +0000 Subject: [PATCH 10/16] Bump version [skip ci] --- fastlane_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index e280bb7a2..1a96a2028 100644 --- a/fastlane_bot/__init__.py +++ b/fastlane_bot/__init__.py @@ -1,7 +1,7 @@ from .bot import CarbonBot as Bot, __VERSION__, __DATE__ from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider -__version__ = '2.5.0' +__version__ = '2.6.0' From c01b33504e2834a4065d30a59e3a41538303c7cb Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 11:58:05 +0000 Subject: [PATCH 11/16] Update changelog [skip ci] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dac6def4..6f6f000ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,3 +9,7 @@ + + + + From d41da87faff21171e170aeca8b6f4a5fbcc875fa Mon Sep 17 00:00:00 2001 From: mikewcasale Date: Wed, 26 Jul 2023 05:06:55 -0700 Subject: [PATCH 12/16] Update release-and-pypi-publish.yml --- .github/workflows/release-and-pypi-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-and-pypi-publish.yml b/.github/workflows/release-and-pypi-publish.yml index e612c4dc1..cb798cd47 100644 --- a/.github/workflows/release-and-pypi-publish.yml +++ b/.github/workflows/release-and-pypi-publish.yml @@ -100,7 +100,7 @@ jobs: NEW_VERSION="${MAJOR}.$((MINOR + 1)).${PATCH}" echo new_version=$NEW_VERSION >> $GITHUB_OUTPUT BRANCH_NAME="version-bump-$NEW_VERSION-run-$GITHUB_RUN_NUMBER" - git checkout -b $BRANCH_NAME +# git checkout -b $BRANCH_NAME sed -i "s/$CURRENT_VERSION/$NEW_VERSION/" fastlane_bot/__init__.py git config --local user.email "action@github.com" git config --local user.name "GitHub Action" @@ -125,7 +125,7 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - sed -i '/[skip ci]/d' CHANGELOG.md +# sed -i '/[skip ci]/d' CHANGELOG.md git add CHANGELOG.md git commit -m "Update changelog [skip ci]" From 250d35f78aa233383ca5a5eedab0fc41aa370987 Mon Sep 17 00:00:00 2001 From: mikewcasale Date: Wed, 26 Jul 2023 06:09:19 -0700 Subject: [PATCH 13/16] Fixes an issue with changelog updates during automated release action. - Combines multiple jobs into a single job. - Implements a new GitHub Action for automated push --- .../workflows/release-and-pypi-publish.yml | 88 ++++++++++--------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release-and-pypi-publish.yml b/.github/workflows/release-and-pypi-publish.yml index cb798cd47..5823ae936 100644 --- a/.github/workflows/release-and-pypi-publish.yml +++ b/.github/workflows/release-and-pypi-publish.yml @@ -72,10 +72,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt --force-reinstall - - - name: Setup Brownie - if: steps.check.outputs.skip != 'true' - run: | + pip install bumpversion brownie networks import ./brownie-config.yaml true brownie networks delete mainnet brownie networks add "Ethereum Mainnet" "mainnet" host="https://eth-mainnet.alchemyapi.io/v2/$WEB3_ALCHEMY_PROJECT_ID" chainid=1 @@ -85,10 +82,6 @@ jobs: WEB3_ALCHEMY_PROJECT_ID: '${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}' ETHERSCAN_TOKEN: '${{ secrets.ETHERSCAN_TOKEN }}' - - name: Install bumpversion - if: steps.check.outputs.skip != 'true' - run: pip install bumpversion - - name: Bump version and set output if: steps.check.outputs.skip != 'true' id: bump_version_and_set_output @@ -100,11 +93,12 @@ jobs: NEW_VERSION="${MAJOR}.$((MINOR + 1)).${PATCH}" echo new_version=$NEW_VERSION >> $GITHUB_OUTPUT BRANCH_NAME="version-bump-$NEW_VERSION-run-$GITHUB_RUN_NUMBER" -# git checkout -b $BRANCH_NAME sed -i "s/$CURRENT_VERSION/$NEW_VERSION/" fastlane_bot/__init__.py + git checkout main git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git commit -m "Bump version [skip ci]" -a + git add fastlane_bot/__init__.py + git commit -m "Bump version [skip ci]" - name: Generate changelog if: steps.check.outputs.skip != 'true' @@ -112,7 +106,7 @@ jobs: with: token: ${{ secrets.GH_TOKEN }} output: 'CHANGELOG.md' - configureSections: '{"Merged pull requests": {"labels": ["pull-request"]}, "Fixed bugs": {"labels": ["bug"]}, "Implemented enhancements": {"labels": ["enhancement"]}, "Closed issues": {"labels": ["closed-issue"]}}' + configureSections: '{"Merged pull requests": {"labels": ["pull-request","Merge pull request"]}, "Fixed bugs": {"labels": ["bug","bugfix"]}, "Implemented enhancements": {"labels": ["enhancement","feature"]}, "Closed issues": {"labels": ["closed-issue"]}}' bugsLabel: 'Fixed bugs' enhancementLabel: 'Implemented enhancements' issuesLabel: 'Closed issues' @@ -123,35 +117,19 @@ jobs: - name: Commit changelog update if: steps.check.outputs.skip != 'true' run: | + git checkout main git config --local user.email "action@github.com" git config --local user.name "GitHub Action" -# sed -i '/[skip ci]/d' CHANGELOG.md git add CHANGELOG.md git commit -m "Update changelog [skip ci]" -# - name: Clean changelog -# if: steps.check.outputs.skip != 'true' -# run: | -# git config --local user.email "action@github.com" -# git config --local user.name "GitHub Action" -# sed -i '/[skip ci]/d' CHANGELOG.md -# git add CHANGELOG.md -# git commit -m "Clean changelog [skip ci]" - -# - name: Commit changelog cleaning -# if: steps.check.outputs.skip != 'true' -# run: | -# git config --local user.email "action@github.com" -# git config --local user.name "GitHub Action" -# git add CHANGELOG.md -# git commit -m "Clean changelog [skip ci]" - -# - name: Extract version changes from CHANGELOG.md -# if: steps.check.outputs.skip != 'true' -# id: extract_changes -# run: | -# VERSION_CHANGES=$(sed -n "/\[v${{ steps.bump_version_and_set_output.outputs.new_version }}\]/,/\[v.*\]/p" CHANGELOG.md | head -n -2) -# echo "::set-output name=version_changes::$VERSION_CHANGES" + # push to main branch using CasperWA/push-protected@v2 action + - name: Push to protected branch + if: steps.check.outputs.skip != 'true' + uses: CasperWA/push-protected@v2 + with: + token: ${{ secrets.GH_TOKEN }} + branch: main - name: Create Release if: steps.check.outputs.skip != 'true' @@ -166,10 +144,38 @@ jobs: draft: false prerelease: false - # Final step, push to main branch using CasperWA/push-protected@v2 action - - name: Push to protected branch - if: steps.check.outputs.skip != 'true' - uses: CasperWA/push-protected@v2 + - name: Create .env file + run: | + echo TENDERLY_FORK=$TENDERLY_FORK > .env + echo WEB3_ALCHEMY_PROJECT_ID=$WEB3_ALCHEMY_PROJECT_ID >> .env + echo ETHERSCAN_TOKEN=$ETHERSCAN_TOKEN >> .env + echo DEFAULT_MIN_PROFIT_BNT=$DEFAULT_MIN_PROFIT_BNT >> .env + echo ETH_PRIVATE_KEY_BE_CAREFUL=$ETH_PRIVATE_KEY_BE_CAREFUL >> .env + echo TENDERLY_FORK_ID=$TENDERLY_FORK_ID >> .env + env: + TENDERLY_FORK: '${{ secrets.TENDERLY_FORK }}' + TENDERLY_FORK_ID: '${{ secrets.TENDERLY_FORK }}' + WEB3_ALCHEMY_PROJECT_ID: '${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}' + ETHERSCAN_TOKEN: '${{ secrets.ETHERSCAN_TOKEN }}' + DEFAULT_MIN_PROFIT_BNT: '${{ secrets.DEFAULT_MIN_PROFIT_BNT }}' + ETH_PRIVATE_KEY_BE_CAREFUL: '${{ secrets.ETH_PRIVATE_KEY_BE_CAREFUL }}' + + - name: Install package + run: | + python setup.py install + + - name: Build package + run: python setup.py sdist + + - name: Build wheel + run: | + pip install wheel + python setup.py bdist_wheel + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: - token: ${{ secrets.GH_TOKEN }} - branch: main + password: ${{ secrets.FASTLANE_PYPI_API_TOKEN }} + repository-url: https://upload.pypi.org/legacy/ + + From 9d03ec8f2b822c729b66c6556635d912ad237b6e Mon Sep 17 00:00:00 2001 From: mikewcasale Date: Wed, 26 Jul 2023 06:11:57 -0700 Subject: [PATCH 14/16] Update version to align with pypi releases --- fastlane_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index 1a96a2028..1482bc505 100644 --- a/fastlane_bot/__init__.py +++ b/fastlane_bot/__init__.py @@ -1,7 +1,7 @@ from .bot import CarbonBot as Bot, __VERSION__, __DATE__ from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider -__version__ = '2.6.0' +__version__ = '2.1.0' From 0b90ff74c66c153a121e07625db8a008d6316f8e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 13:33:48 +0000 Subject: [PATCH 15/16] Bump version [skip ci] --- fastlane_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index 1482bc505..8d9e0bd93 100644 --- a/fastlane_bot/__init__.py +++ b/fastlane_bot/__init__.py @@ -1,7 +1,7 @@ from .bot import CarbonBot as Bot, __VERSION__, __DATE__ from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider -__version__ = '2.1.0' +__version__ = '2.2.0' From 031ab40684c120dc495a2b3b078074d0d49a30f2 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 26 Jul 2023 13:33:53 +0000 Subject: [PATCH 16/16] Update changelog [skip ci] --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f6f000ee..3e4eb9b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,70 @@ +# Changelog +## [Unreleased](https://github.com/bancorprotocol/fastlane-bot/tree/HEAD) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725g...HEAD) +Merged pull requests +- Bugfix/automated release action [\#29](https://github.com/bancorprotocol/fastlane-bot/pull/29) ([mikewcasale](https://github.com/mikewcasale)) +- Bugfix/GitHub actions [\#28](https://github.com/bancorprotocol/fastlane-bot/pull/28) ([mikewcasale](https://github.com/mikewcasale)) +- Bump version \[skip ci\] [\#21](https://github.com/bancorprotocol/fastlane-bot/pull/21) ([bancor-services](https://github.com/bancor-services)) +- Bump version \[skip ci\] [\#20](https://github.com/bancorprotocol/fastlane-bot/pull/20) ([bancor-services](https://github.com/bancor-services)) +- updating DEFAULT\_MIN\_PROFIT\_BNT to 1 [\#19](https://github.com/bancorprotocol/fastlane-bot/pull/19) ([mikewcasale](https://github.com/mikewcasale)) +## [main_skl_flbot_20230725g](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725g) (2023-07-25) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725f...main_skl_flbot_20230725g) +## [main_skl_flbot_20230725f](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725f) (2023-07-25) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725e...main_skl_flbot_20230725f) +## [main_skl_flbot_20230725e](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725e) (2023-07-25) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725d...main_skl_flbot_20230725e) +## [main_skl_flbot_20230725d](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725d) (2023-07-25) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725c...main_skl_flbot_20230725d) +## [main_skl_flbot_20230725c](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725c) (2023-07-25) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725b...main_skl_flbot_20230725c) +## [main_skl_flbot_20230725b](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725b) (2023-07-25) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/main_skl_flbot_20230725...main_skl_flbot_20230725b) + +## [main_skl_flbot_20230725](https://github.com/bancorprotocol/fastlane-bot/tree/main_skl_flbot_20230725) (2023-07-25) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.1.0...main_skl_flbot_20230725) + +## [v2.1.0](https://github.com/bancorprotocol/fastlane-bot/tree/v2.1.0) (2023-07-24) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v1.0...v2.1.0) + +Merged pull requests + +- Bump version \[skip ci\] [\#15](https://github.com/bancorprotocol/fastlane-bot/pull/15) ([bancor-services](https://github.com/bancor-services)) +- Bump version \[skip ci\] [\#14](https://github.com/bancorprotocol/fastlane-bot/pull/14) ([bancor-services](https://github.com/bancor-services)) + +## [v1.0](https://github.com/bancorprotocol/fastlane-bot/tree/v1.0) (2023-05-23) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/8ba1c6eebf13a8ff8e550cb28ea86e7e286e4e43...v1.0) + +Merged pull requests + +- Feature/read reward settings from arb contract [\#10](https://github.com/bancorprotocol/fastlane-bot/pull/10) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Fix typo in readme [\#9](https://github.com/bancorprotocol/fastlane-bot/pull/9) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- update arb function name [\#8](https://github.com/bancorprotocol/fastlane-bot/pull/8) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Update contract ABI [\#7](https://github.com/bancorprotocol/fastlane-bot/pull/7) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Feature/contract upgrade [\#6](https://github.com/bancorprotocol/fastlane-bot/pull/6) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Feature/private transactions [\#4](https://github.com/bancorprotocol/fastlane-bot/pull/4) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Bugfix/collection path [\#3](https://github.com/bancorprotocol/fastlane-bot/pull/3) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Dev [\#2](https://github.com/bancorprotocol/fastlane-bot/pull/2) ([mikewcasale](https://github.com/mikewcasale)) +- Dev [\#1](https://github.com/bancorprotocol/fastlane-bot/pull/1) ([mikewcasale](https://github.com/mikewcasale)) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*