Skip to content

ci(publish): fix tag and publish job to use python 3.8 #459

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

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

a-dubs
Copy link
Contributor

@a-dubs a-dubs commented Jan 20, 2025

Fixes: GH-458 (#458)

Here is the workflow run that passed using the new changes:
https://github.com/canonical/pycloudlib/actions/runs/12872046199/job/35886676346

Here was the patch that allowed the above changes to work:

diff --git a/.github/workflows/tag_and_publish.yaml b/.github/workflows/tag_and_publish.yaml
index 96569ae..4186032 100644
--- a/.github/workflows/tag_and_publish.yaml
+++ b/.github/workflows/tag_and_publish.yaml
@@ -3,6 +3,7 @@ on:
   push:
     branches:
       - main
+      - GH-458-fix-publish-job
 
 concurrency: ${{ github.ref }}
 
@@ -18,9 +19,9 @@ jobs:
         id: tag-release
         run: |
           version=$(cat VERSION)
-          git tag $version
-          git push origin $version
-          echo "version=$version" >> $GITHUB_OUTPUT
+          # git tag $version
+          # git push origin $version
+          # echo "version=$version" >> $GITHUB_OUTPUT
   publish-release:
     needs: tag-release
     runs-on: ubuntu-latest
@@ -29,10 +30,10 @@ jobs:
         uses: actions/checkout@v3
         with:
           ref: ${{ needs.tag-release.outputs.version}}
-      - name: Set up Python 3.7
+      - name: Set up Python 3.8
         uses: actions/setup-python@v3
         with:
-          python-version: "3.7"
+          python-version: "3.8"
       - name: Install pypa/build
         run: python -m pip install build --user
       - name: Build sdist and wheel

As you can see, i had to temporarily disable the git commands run in the tag-release step and then also temporarily add this branch as an allowed branch to trigger the workflow action.

@a-dubs a-dubs requested a review from TheRealFalcon January 20, 2025 16:21
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a version bump, but otherwise LGTM

@a-dubs a-dubs force-pushed the GH-458-fix-publish-job branch from e6d3eaf to 66ddee6 Compare January 20, 2025 17:13
@a-dubs
Copy link
Contributor Author

a-dubs commented Jan 20, 2025

@TheRealFalcon bumped!

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@a-dubs a-dubs merged commit a24da76 into main Jan 20, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci bug: publish job broken
2 participants