Merge pull request #48 from jkueh/dependabot/go_modules/github.com/aw… #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a GitHub release | |
on: | |
push: | |
tags: ["v*"] | |
name: Create Release | |
jobs: | |
build: | |
name: Build Release Artefacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.19 | |
id: go | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build project | |
run: auto/build | |
- name: Upload build artefacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries | |
path: build/roo_* | |
build_push_docker: | |
name: Build & Push | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- 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 to GitHub Container Registry | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64,darwin/arm64 | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository }}:latest | |
ghcr.io/${{ github.repository }}:${{ github.sha }} | |
ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
create_release: | |
name: Create GitHub Release | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- build_push_docker | |
steps: | |
- name: Download compiled binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: binaries | |
path: build/ | |
- name: Create release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
files: build/roo_* | |
body: | | |
Release: Version ${{ github.ref_name }} | |
Docker Image: `ghcr.io/${{ github.repository }}:${{ github.ref_name }}` |