.github/workflows/release.yml
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
docker:
name: Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
- name: Login to DockerHub
uses: docker/login-action@v3.3.0
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker tags
id: tags
uses: docker/metadata-action@v5
with:
images: andrcuns/allure-report-publisher
flavor: latest=false
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v6.9.0
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.tags.outputs.tags }}
gem:
name: Ruby gem
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.6
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Build and push
run: bundle exec rake release
env:
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
gh-release:
name: Github release
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4.1.6
- uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true