Skip to content

Release 0.7.0-rc.3

Release 0.7.0-rc.3 #18

Workflow file for this run

name: Goreleaser
on:
push:
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GORELEASER_VERSION: v1.20.0
permissions:
contents: write
jobs:
build-binary:
name: Build binary using goreleaser
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version-file: go.mod
check-latest: true
cache: true
- name: Set up Node.js
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
with:
node-version-file: .node-version
- name: Build and release binaries
uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4.6.0
with:
distribution: goreleaser
version: ${{ env.GORELEASER_VERSION }}
args: release --clean --timeout=60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive generated artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: pyrra-dist-binaries
if-no-files-found: error
path: |
dist
!dist/*.txt
build-and-push-container:
name: Container build and push
needs: build-binary
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: write
contents: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7
with:
platforms: amd64.arm64,arm
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: pyrra-dist-binaries
path: dist
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64, linux/arm/v7