From 1fd6a618b60d7168fd8f37585d5d39d22d775afd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 28 Mar 2024 07:11:39 +0100 Subject: Adding upstream version 0.13.0. Signed-off-by: Daniel Baumann --- .github/workflows/release.yml | 110 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/release.yml (limited to '.github/workflows/release.yml') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6b9088f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,110 @@ +--- +name: "Tag & Release management" +on: + release: + types: + - published + +jobs: + pypi: + name: Publish version to Pypi servers + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel build + - name: Build package + run: | + python -m build + - name: Publish package to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + + release-coverage: + name: Updated ANTA release coverage badge + runs-on: ubuntu-20.04 + needs: [pypi] + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install dependencies + run: pip install genbadge[coverage] tox tox-gh-actions + - name: "Run pytest via tox for ${{ matrix.python }}" + run: tox + - name: Generate coverage badge + run: genbadge coverage -i .coverage.xml -o badge/latest-release-coverage.svg + - name: Publish coverage badge to gh-pages branch + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: coverage-badge + folder: badge + release-doc: + name: "Publish documentation for release ${{github.ref_name}}" + runs-on: ubuntu-latest + needs: [release-coverage] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: 'Setup Python 3 on runner' + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Setup Git config + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + - name: 'Build mkdocs content to site folder' + run: | + pip install .[doc] + mike deploy --update-alias --push ${{github.ref_name}} stable + + docker: + name: Docker Image Build + runs-on: ubuntu-latest + needs: [pypi] + strategy: + matrix: + platform: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + - linux/arm/v8 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker meta for TAG + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + tags: | + type=semver,pattern={{version}} + type=raw,value=latest + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + push: true + platforms: linux/amd64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} -- cgit v1.2.3