Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update release process to match other repos #115

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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