3.26.1 #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag-Actions | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
github-release: | |
name: Github Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
pypi-publish: | |
name: PyPI Publish | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://pypi.org/p/brewtils | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Cache PIP Install | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-build-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-3.7-pip-build | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Make Package | |
run: make package | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
pypi-verify: | |
name: Verify PyPI Publish | |
runs-on: ubuntu-latest | |
needs: pypi-publish | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Check PyPi | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_seconds: 30 | |
max_attempts: 5 | |
retry_on: error | |
retry_wait_seconds: 10 | |
command: pip install brewtils==${GITHUB_REF#refs/tags/} | |
docker-publish: | |
name: Docker Publish | |
runs-on: ubuntu-latest | |
needs: pypi-verify | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and publish images | |
run: make publish-docker VERSION=${GITHUB_REF#refs/tags/} | |
- name: Build and publish documentation images | |
run: make docs-deps publish-docker-docs VERSION=${GITHUB_REF#refs/tags/} |