Skip to content

Commit

Permalink
Ab fix release process (#558)
Browse files Browse the repository at this point in the history
* removing full requirements from setup.py and only installing in github action tests and docker

* fixing path to requirements file

* added github action for pushing to pypi upon github release

* removing releasing to testpypi

* added gh action for pushing docker to gcr and ghcr

* github actions cannot use both uses and run, removing the uses

* fixing gh action to remove with and use env for a run

* changed hardcoded username for docker login to gh secret

* temporarily changing version to test out gh actions

* Changing trigger to push: tags: to try to auto kick off on tagging a release

* Changing trigger to be on push: tags: to try to get this auto deployed

* removing the creation of a github release from the action - we are already making a release from the UI which triggers this, no need

* adding gcloud auth for docker to support pushing to gcr

---------

Co-authored-by: Alexander Baumann <[email protected]>
  • Loading branch information
abaumann and Alexander Baumann authored Mar 28, 2024
1 parent b02e8d4 commit 5d81853
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 44 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-to-gcr-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- name: Building and pushing the image
run: |
docker login ghcr.io -u ${github_username} -p ${github_token}
yes | gcloud auth configure-docker gcr.io
./docker/vm_boot_images/build.sh -P
./docker/vm_boot_images/build.sh -c -P
env:
Expand Down
45 changes: 1 addition & 44 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,47 +55,4 @@ jobs:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 5d81853

Please sign in to comment.