Skip to content
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

Implement Proper Release Workflow with Git Tags #26

Open
MarcoHuebner opened this issue Nov 4, 2023 · 2 comments · May be fixed by #69
Open

Implement Proper Release Workflow with Git Tags #26

MarcoHuebner opened this issue Nov 4, 2023 · 2 comments · May be fixed by #69
Assignees
Labels
enhancement New feature or request

Comments

@MarcoHuebner
Copy link
Collaborator

MarcoHuebner commented Nov 4, 2023

While our development process has been progressing smoothly, it's crucial to invest time in establishing a more formal release workflow. Currently, we lack a standardized approach to versioning and release management, which can lead to challenges in tracking changes and coordinating releases. Implementing a proper release workflow, including the use of Git tags, will contribute to a more organized and transparent development process.

Implementation Steps:

Release Workflow w\ Git Tags:

  • Define a standardized release process that includes versioning, changelogs, and pre-release testing.
  • Document the release process and guidelines for versioning in the project documentation.
  • Integrate the use of Git tags into the release process and ensure that each release is tagged with the corresponding version number.
@MarcoHuebner MarcoHuebner added the enhancement New feature or request label Nov 4, 2023
@MarcoHuebner
Copy link
Collaborator Author

Potential out-of-the-box workflow:

https://github.com/marketplace/actions/publish-python-poetry-package

Example workflow (on push with new tag in format *.*.*)

name: Python package
on:
  push:
    tags:
      - "v*.*.*"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build and publish to pypi
        uses: JRubics/poetry-publish@v2.0
        with:
          pypi_token: ${{ secrets.PYPI_TOKEN }}

@MarcoHuebner
Copy link
Collaborator Author

MarcoHuebner commented Feb 28, 2024

Added a workflow that is triggered by every release - seemed more robust than on push to main or specific tags.

To discuss:

  • How does the tag an release workflow look so far? Anything we we would like to or should automate?
  • poetry and python versions are afaik currently hard-coded in every workflow individually - can we make this more stable?

One possibility would be to add

POETRY_VERSION: 1.6.1
PYTHON_VERSION: "3.10"

to a generic .github\workflows\config.yaml, however, the import into the individual workflows looks like quite an overhead

steps:
  - name: Checkout code
    uses: actions/checkout@v2

  - name: Read config file
    id: config
    uses: read-yaml-action@v1
    with:
      path: .github/config.yaml

  - name: Set environment variables
    run: |
      echo "POETRY_VERSION=${{ steps.config.outputs.POETRY_VERSION }}" >> $GITHUB_ENV
      echo "PYTHON_VERSION=${{ steps.config.outputs.PYTHON_VERSION }}" >> $GITHUB_ENV

and then calling e.g. ${{ env.POETRY_VERSION }} every time

@MarcoHuebner MarcoHuebner linked a pull request Mar 5, 2024 that will close this issue
MarcoHuebner added a commit that referenced this issue Mar 11, 2024
Relies on variables PYTHON_VERSION and POETRY_VERSION to be defined in Settings/Secrets and Variables/Variables (Repository Variables)

#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant