Skip to content

Commit

Permalink
ci: Separate goreleaser and git release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mircea-pavel-anton committed Sep 29, 2024
1 parent 9e0637d commit 00c05f0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release
name: Git Release

on:
# Manual Trigger
Expand All @@ -15,7 +15,7 @@ on:
# Dry Run on any PR that changes this pipeline or that should ultimately trigger a release when merged
pull_request:
paths:
- ".github/workflows/release.yaml"
- ".github/workflows/git-release.yaml"
- "go.mod"
- "go.sum"
- "**/**.go"
Expand All @@ -29,15 +29,8 @@ on:
- "**/**.go"

jobs:
git:
release:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-release-semver.yaml@2981539811fdf240b8f704ced3e88b0ef4e4f326 # v3.4.7
secrets: inherit
with:
dry-run: ${{ inputs.dry-run || github.event_name == 'pull_request' }}

goreleaser:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-go-release.yaml@2981539811fdf240b8f704ced3e88b0ef4e4f326 # v3.4.7
needs: [git]
secrets: inherit
with:
dry-run: ${{ inputs.dry-run || github.event_name == 'pull_request' }}
32 changes: 32 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Goreleaser

on:
# Manual Trigger
workflow_dispatch:
inputs:
dry-run:
description: Dry Run
required: false
default: false
type: boolean

# Dry Run on any PR that changes this pipeline or that should ultimately trigger a release when merged
pull_request:
paths:
- ".github/workflows/goreleaser.yaml"
- "go.mod"
- "go.sum"
- "**/**.go"

# "Wet" Run on any tag push
push:
tags: ["*"]

jobs:
goreleaser:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-go-release.yaml@2981539811fdf240b8f704ced3e88b0ef4e4f326 # v3.4.7
secrets: inherit
with:
dry-run: ${{ inputs.dry-run || github.event_name == 'pull_request' }}

0 comments on commit 00c05f0

Please sign in to comment.