Skip to content

Commit

Permalink
ci: Improve GitHub release workflow configuration
Browse files Browse the repository at this point in the history
- Added GitHub workflows for fixing releases
- Defined permissions for the workflow
- Set up jobs for publishing packages and images
- Utilized matrix strategy for running jobs on different architectures
  • Loading branch information
johnnyhuy committed Apr 21, 2024
1 parent 8a391ce commit 0ffa089
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/fix-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Fix Release

on:
workflow_dispatch:
inputs:
version:
description: Version
required: true
default: '0.0.0'

permissions: write-all

env:
VERSION: ${{ inputs.version }}

jobs:
publish-package:
runs-on: ubuntu-latest
continue-on-error: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: make publish-package

publish-image:
runs-on: ubuntu-latest
continue-on-error: true

strategy:
matrix:
arch: [linux/amd64, linux/arm64]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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
continue-on-error: true

steps:
- uses: release-drafter/release-drafter@v5
with:
publish: true
version: ${{ inputs.version }}

0 comments on commit 0ffa089

Please sign in to comment.