Skip to content

chore(main): release 1.5.3 (#66) #22

chore(main): release 1.5.3 (#66)

chore(main): release 1.5.3 (#66) #22

name: "Release Please"
on:
push:
branches:
- main
- release/*
workflow_dispatch:
jobs:
trigger-release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
target-branch: ${{ github.ref_name }}
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
build-wheel:
runs-on: ubuntu-latest
needs: trigger-release
if: needs.trigger-release.outputs.release_created
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SetUp python interpreter
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Load cached poetry
uses: actions/cache@v4
with:
path: ~/.local
key: dotlocal-${{ runner.os }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Build library
run: |
poetry build --no-interaction --format=wheel
- name: Upload wheel
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Uploading wheel to release ${{ needs.trigger-release.outputs.tag_name }}"
gh release upload ${{ needs.trigger-release.outputs.tag_name }} dist/*.whl
build-image:
runs-on: ubuntu-latest
needs: trigger-release
if: needs.trigger-release.outputs.release_created
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# ------------------------------------------------
# Setup Docker ad Qemu
# ------------------------------------------------
- name: SetUp QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: >
nuvladev/nuvlaedge-validation:${{ needs.trigger-release.outputs.tag_name }},
nuvladev/nuvlaedge-validation:latest
cache-from: type=gha
cache-to: type=gha,mode=max