v6.8.1 #25
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: Publish release to PyPi | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-latest-release-to-pypi: | |
runs-on: ubuntu-latest | |
name: Publish release to PyPi | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Initialize Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
- name: Build binary wheel and a source tarball | |
run: python setup.py sdist bdist_wheel | |
- name: Publish to Test PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
containerbuild: | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v3 | |
with: | |
push: true # Will only build if this is not here | |
build-args: | | |
LOGPREP_VERSION=${{ github.ref_name }} | |
PYTHON_VERSION=${{ matrix.python-version }} | |
tags: | | |
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.ref_name }} | |
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-stable | |
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-latest |