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

Ab fix release process #558

Merged
merged 15 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/publish-to-gcr-ghcr.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Push to GCR/GHCR GitHub Action
on: push
on:
push:
tags:
- '*' # Push events to every tag not containing /


jobs:
build-and-push-to-gcr-service-account:
name: Build & push to GCR/GHCR
if: startsWith(github.ref, 'refs/tags/') # only publish to registry on tag pushes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -16,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
51 changes: 5 additions & 46 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Publish Python 🐍 distribution 📦 to PyPI

on: push
on:
push:
tags:
- '*' # Push events to every tag not containing /

jobs:
build:
Expand Down Expand Up @@ -36,7 +39,6 @@ jobs:
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -53,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
Loading