blob: 5906289e660df0402d6f670df7800f4756e85a10 [file] [log] [blame]
# Cut a release whenever a new tag is pushed to the repo.
name: Release
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare workspace snippet
run: .github/workflows/workspace_snippet.sh > release_notes.txt
- name: Build wheel dist
run: bazel build --stamp --embed_label=${{ env.GITHUB_REF_NAME }} //python/runfiles:wheel
- name: Publish runfiles package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# Note, the PYPI_API_TOKEN was added on
# https://github.com/bazelbuild/rules_python/settings/secrets/actions
# and currently uses a token which authenticates as https://pypi.org/user/alexeagle/
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: bazel-bin/python/runfiles
- name: Release
uses: softprops/action-gh-release@v1
with:
# Use GH feature to populate the changelog automatically
generate_release_notes: true
body_path: release_notes.txt