1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
name: Release Python Package
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
IMAGE_TAG: protoc-gen-validate:${{ github.sha }}
REF_NAME: ${{ github.ref_name }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and export to Docker
uses: docker/build-push-action@v3
with:
context: .
load: true
push: false
tags: ${{ env.IMAGE_TAG }}
- run: |
docker run --rm \
--env PYPI_REPO=pypi \
--env PGV_PYPI_TOKEN="${{ secrets.PGV_PYPI_TOKEN }}" \
${{ env.IMAGE_TAG }} SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.REF_NAME }} python-release
|