Skip to content

ci: Refactor workflow configuration and Makefile targets #23

ci: Refactor workflow configuration and Makefile targets

ci: Refactor workflow configuration and Makefile targets #23

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions: write-all
jobs:
draft-release:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.drafter.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: release-drafter/release-drafter@v5
id: drafter
publish-package:
runs-on: ubuntu-latest
needs: draft-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
VERSION: ${{ needs.draft-release.outputs.tag_name }}
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: make publish-package
publish-image:
runs-on: ubuntu-latest
needs: draft-release
strategy:
matrix:
arch: [linux/amd64, linux/arm64]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ needs.draft-release.outputs.tag_name }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- run: make publish-image
env:
DOCKER_DEFAULT_PLATFORM: ${{ matrix.arch }}
publish-release:
runs-on: ubuntu-latest
needs:
- publish-package
- publish-image
steps:
- uses: release-drafter/release-drafter@v5
with:
publish: true