From 0ee86d9faffb9bf6ca02642ee187d3e0ad52d09f Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Sun, 23 Jul 2023 09:15:31 -0700 Subject: [PATCH 1/4] Update publish_package.yml --- .github/workflows/publish_package.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index 501611bdfcb..a83ce7b6c18 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -20,9 +20,25 @@ jobs: run: | curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.poetry/bin" >> $GITHUB_PATH + - name: Build project for distribution + run: poetry build - name: Install dependencies run: poetry install + - name: Check Version + id: check-version + run: | + echo version=$(poetry version --short) >> $GITHUB_OUTPUT + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + artifacts: "dist/*" + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + generateReleaseNotes: true + tag: v${{ steps.check-version.outputs.version }} + commit: master - name: Build and publish - run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} + run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} From dbfd1b886cfcbd7fde74aa8356edecd4eadfb716 Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Sun, 23 Jul 2023 12:01:57 -0700 Subject: [PATCH 2/4] Make spreadsheet dynamic --- .github/workflows/ci.yml | 1 + send_to_googledrive.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c638c812c0..15c7bf5e2df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,3 +206,4 @@ jobs: fi env: GDRIVE_BASE64: ${{ secrets.GDRIVE_BASE64 }} + GITHUB_REF_NAME: ${{ github.ref_name }} diff --git a/send_to_googledrive.py b/send_to_googledrive.py index aa074ea6acb..0e2cebe5a0e 100644 --- a/send_to_googledrive.py +++ b/send_to_googledrive.py @@ -94,7 +94,8 @@ client = gspread.authorize(creds) # Get the instance of the Spreadsheet -sheet = client.open("benchmark") +branch_name = os.getenv("GITHUB_REF_NAME") +sheet = client.open(f"benchmark-{branch_name}") # Get the first sheet of the Spreadsheet sheet_instance = sheet.get_worksheet(0) From b833c185b0bbd7daec577046e84608890a121f6e Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Sun, 23 Jul 2023 12:31:50 -0700 Subject: [PATCH 3/4] Update permission in github workflow --- .github/workflows/publish_package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index a83ce7b6c18..103f1340871 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -6,7 +6,8 @@ on: jobs: deploy: runs-on: ubuntu-latest - + permissions: + contents: write steps: - name: Checkout repository uses: actions/checkout@v2 From db4d09dc62a9ab3557a02ab6174731d6133a7006 Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Sun, 23 Jul 2023 12:50:02 -0700 Subject: [PATCH 4/4] Change package version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e46227abc3d..7b8fbd828ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "agbenchmark" -version = "0.1.0" +version = "0.0.1" description = "Benchmarking the performance of agents far and wide, regardless of how they are set up and how they work" authors = ["Silen Naihin "] license = "MIT"