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

Draft notes on setting up RELEASE.md and release.yaml #40

Open
consideRatio opened this issue Jun 6, 2023 · 0 comments
Open

Draft notes on setting up RELEASE.md and release.yaml #40

consideRatio opened this issue Jun 6, 2023 · 0 comments

Comments

@consideRatio
Copy link
Collaborator

This project doesn't make releases, so installing it has been done from the main branch.

The project includes a Dockerfile, a Helm chart, a Python package, and docs. I think making sure the docs and python package is published with various versions would make sense.

Below is a proposal for a release.yaml to be accompanied with a RELEASE.md like for example in tmpauthenticator that also is light-weight and doesn't come with a conda-forge package.

# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Release

# Always tests wheel building, but only publish to PyPI on pushed tags.
on:
  pull_request:
    paths-ignore:
      - "docs/**"
      - ".github/workflows/*.yaml"
      - "!.github/workflows/release.yaml"
  push:
    paths-ignore:
      - "docs/**"
      - ".github/workflows/*.yaml"
      - "!.github/workflows/release.yaml"
    branches-ignore:
      - "dependabot/**"
      - "pre-commit-ci-update-config"
    tags: ["**"]
  workflow_dispatch:

jobs:
  # FIXME: Publish a PyPI package and register this workflow as trusted via
  #        PyPI, and write RELEASE.md like in
  #        https://github.com/jupyterhub/tmpauthenticator/blob/main/RELEASE.md
  #        that matches this repo by not having a conda-forge package etc.
  #
  build-release:
    runs-on: ubuntu-22.04
    permissions:
      # id-token=write is required for pypa/gh-action-pypi-publish, and the PyPI
      # project needs to be configured to trust this workflow.
      #
      # ref: https://github.com/jupyterhub/team-compass/issues/648
      #
      id-token: write

    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.11"

      - name: install build package
        run: |
          pip install --upgrade pip
          pip install build
          pip freeze

      - name: build release
        run: |
          python -m build --sdist --wheel .
          ls -l dist

      
      - name: publish to pypi
        uses: pypa/gh-action-pypi-publish@release/v1
        if: startsWith(github.ref, 'refs/tags/')

  # FIXME: Consider if and how...
  #        
  #        - The helm chart should(?) be packaged and published with releases
  #        - The Dockerfile should(?) be build and pushed with releases
  #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant