Skip to content

Commit

Permalink
update release process to match other repos (#115)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Mason <[email protected]>
  • Loading branch information
mikemrm authored Jun 19, 2023
1 parent 3b71114 commit 21035a3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 12 deletions.
48 changes: 36 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
name: release
name: Release
on:
push:
tags:
- '*'
- v**

jobs:
release:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- run: git fetch --force --tags

- uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

helm:
runs-on: ubuntu-latest
needs: goreleaser
steps:
- uses: actions/checkout@v3

Expand All @@ -20,12 +53,3 @@ jobs:
app_version: ${{ github.ref_name }}
chart_version: ${{ github.ref_name }}
branch: gh-pages

image-build:
uses: metal-toolbox/container-push/.github/workflows/container-push.yml@main
with:
name: permissions-api
tag: ${{ github.ref_name }}
registry_org: ${{ github.repository_owner }}
dockerfile_path: Dockerfile
platforms: linux/amd64,linux/arm64
5 changes: 5 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json

includes:
- from_url:
url: https://raw.githubusercontent.com/infratographer/release/main/goreleaser/base.yml

0 comments on commit 21035a3

Please sign in to comment.