From 249eae8586303abf1426a5e211a651d458ed1d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:58:07 +0100 Subject: [PATCH 01/10] Create update-readme.yml Created a simple workflow that updates the version number in the Readme.md after each relaese --- .github/workflows/update-readme.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..f5f8cdf --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,29 @@ +name: Update README with Release Version + +on: + release: + types: [published] + +jobs: + update-readme: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Extract Release Version + id: extract_version + run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" + + - name: Update README.md with New Version + run: | + sed -i "s/multi_conn_ac-[0-9.]*-py3-none-any\.whl/multi_conn_ac-${{ steps.extract_version.outputs.version }}-py3-none-any\.whl/" README.md + + - name: Commit and Push Changes + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git add README.md + git commit -m "Update README.md with version ${{ steps.extract_version.outputs.version }}" + git push From f72d354116a1d73fc7efe34c5b93a08792378c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:08:08 +0100 Subject: [PATCH 02/10] Update update-readme.yml --- .github/workflows/update-readme.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index f5f8cdf..f0f7470 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -11,6 +11,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + ref: main # Replace 'main' with the default branch of your repository if different - name: Extract Release Version id: extract_version @@ -26,4 +28,4 @@ jobs: git config --local user.email "github-actions[bot]@users.noreply.github.com" git add README.md git commit -m "Update README.md with version ${{ steps.extract_version.outputs.version }}" - git push + git push origin HEAD:main # Push changes to the main branch From 0c4da6ba56fec911dc272712b0961a0e77a5dfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:12:55 +0100 Subject: [PATCH 03/10] Update update-readme.yml --- .github/workflows/update-readme.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index f0f7470..52b5bfb 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -12,7 +12,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - ref: main # Replace 'main' with the default branch of your repository if different + fetch-depth: 0 # Ensure full history is fetched for branch operations + ref: main # Replace 'main' with the default branch of your repository + + - name: Create a local branch + run: | + git checkout -B main # Replace 'main' with your default branch name - name: Extract Release Version id: extract_version @@ -28,4 +33,5 @@ jobs: git config --local user.email "github-actions[bot]@users.noreply.github.com" git add README.md git commit -m "Update README.md with version ${{ steps.extract_version.outputs.version }}" - git push origin HEAD:main # Push changes to the main branch + git push origin main # Push changes to the main branch + From fa7c8611192db0d40109d483539b2ac30395ab9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:16:22 +0100 Subject: [PATCH 04/10] Update update-readme.yml --- .github/workflows/update-readme.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 52b5bfb..f65cbf5 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -13,25 +13,25 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 # Ensure full history is fetched for branch operations - ref: main # Replace 'main' with the default branch of your repository - - name: Create a local branch + - name: Switch to Default Branch run: | - git checkout -B main # Replace 'main' with your default branch name + # Identify the default branch + DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch" | cut -d' ' -f5) + git checkout $DEFAULT_BRANCH - name: Extract Release Version id: extract_version - run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" + run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Update README.md with New Version run: | - sed -i "s/multi_conn_ac-[0-9.]*-py3-none-any\.whl/multi_conn_ac-${{ steps.extract_version.outputs.version }}-py3-none-any\.whl/" README.md + sed -i "s/multi_conn_ac-[0-9.]*-py3-none-any\.whl/multi_conn_ac-${{ env.version }}-py3-none-any\.whl/" README.md - name: Commit and Push Changes run: | git config --local user.name "github-actions[bot]" git config --local user.email "github-actions[bot]@users.noreply.github.com" git add README.md - git commit -m "Update README.md with version ${{ steps.extract_version.outputs.version }}" - git push origin main # Push changes to the main branch - + git commit -m "Update README.md with version ${{ env.version }}" + git push origin HEAD From 8824032b533ba2a5726a280afadf6d191d866ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:19:35 +0100 Subject: [PATCH 05/10] Update update-readme.yml --- .github/workflows/update-readme.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index f65cbf5..d027811 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -12,12 +12,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - fetch-depth: 0 # Ensure full history is fetched for branch operations + fetch-depth: 0 # Fetch full history to allow branch operations - name: Switch to Default Branch run: | - # Identify the default branch + # Determine the default branch dynamically DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch" | cut -d' ' -f5) + git fetch origin $DEFAULT_BRANCH git checkout $DEFAULT_BRANCH - name: Extract Release Version From 25564e73c0946bdfca0820f46262b1c1c210ea4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:27:06 +0100 Subject: [PATCH 06/10] Update update-readme.yml --- .github/workflows/update-readme.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index d027811..07c4f44 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -1,6 +1,8 @@ name: Update README with Release Version on: + + workflow_dispatch: release: types: [published] From cce785abb8c08b427f3ec9aa766956e7c85c05e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:32:21 +0100 Subject: [PATCH 07/10] Update update-readme.yml --- .github/workflows/update-readme.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 07c4f44..85fdcfd 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -29,7 +29,8 @@ jobs: - name: Update README.md with New Version run: | - sed -i "s/multi_conn_ac-[0-9.]*-py3-none-any\.whl/multi_conn_ac-${{ env.version }}-py3-none-any\.whl/" README.md + sed -i "s|multi_conn_ac-[0-9.]*-py3-none-any\.whl|multi_conn_ac-refs/heads/main-py3-none-any\.whl|" README.md + - name: Commit and Push Changes run: | From a37741978530fcf2c665393fb087b628b628bcbb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 Jan 2025 21:40:36 +0000 Subject: [PATCH 08/10] Update README.md with version refs/heads/main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ac4c54..b952180 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can install the latest version of the package from the following link using `pip`: ```bash -pip install https://github.com/SzamosiMate/MultiConnAC/releases/latest/download/multi_conn_ac-0.1.1-py3-none-any.whl +pip install https://github.com/SzamosiMate/MultiConnAC/releases/latest/download/multi_conn_ac-refs/heads/main-py3-none-any.whl ``` The package depends on the [Tapir Archicad Add-On](https://github.com/ENZYME-APD/tapir-archicad-automation?tab=readme-ov-file). It is recommended to install the latest version of Tapir to access all features. While some functionality may work without the add-on, all tests have been conducted with it installed. From b01294dd2af602f10c0e0250aca448cac092bf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:43:14 +0100 Subject: [PATCH 09/10] Delete .github/workflows/update-readme.yml --- .github/workflows/update-readme.yml | 41 ----------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml deleted file mode 100644 index 85fdcfd..0000000 --- a/.github/workflows/update-readme.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Update README with Release Version - -on: - - workflow_dispatch: - release: - types: [published] - -jobs: - update-readme: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Fetch full history to allow branch operations - - - name: Switch to Default Branch - run: | - # Determine the default branch dynamically - DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch" | cut -d' ' -f5) - git fetch origin $DEFAULT_BRANCH - git checkout $DEFAULT_BRANCH - - - name: Extract Release Version - id: extract_version - run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - - - name: Update README.md with New Version - run: | - sed -i "s|multi_conn_ac-[0-9.]*-py3-none-any\.whl|multi_conn_ac-refs/heads/main-py3-none-any\.whl|" README.md - - - - name: Commit and Push Changes - run: | - git config --local user.name "github-actions[bot]" - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git add README.md - git commit -m "Update README.md with version ${{ env.version }}" - git push origin HEAD From 9fae774f7c320f1342dbf6b37c90d8aa1a98e896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:45:17 +0100 Subject: [PATCH 10/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b952180..78eb138 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can install the latest version of the package from the following link using `pip`: ```bash -pip install https://github.com/SzamosiMate/MultiConnAC/releases/latest/download/multi_conn_ac-refs/heads/main-py3-none-any.whl +pip install https://github.com/SzamosiMate/MultiConnAC/releases/latest/download/multi_conn_ac-0.1.2-py3-none-any.whl ``` The package depends on the [Tapir Archicad Add-On](https://github.com/ENZYME-APD/tapir-archicad-automation?tab=readme-ov-file). It is recommended to install the latest version of Tapir to access all features. While some functionality may work without the add-on, all tests have been conducted with it installed.