Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kamushadenes committed Feb 25, 2025
1 parent 1ada60e commit 349b755
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ name: Create Release
on:
push:
tags:
- "*"
- "v*"
workflow_call:
inputs:
extra_args:
description: Extra args for go-releaser, for example '--snapshot'
current-tag:
required: false
type: string

Expand All @@ -21,6 +20,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: release
fetch-depth: 0
fetch-tags: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -41,6 +44,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --clean ${{ inputs.extra_args }}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ inputs.current-tag }}
8 changes: 6 additions & 2 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Versioning
on:
push:
branches:
- main
- release

permissions:
contents: write
Expand All @@ -12,6 +12,8 @@ permissions:
jobs:
versioning:
runs-on: ubuntu-latest
outputs:
current-tag: ${{ steps.calculate-version.outputs.version-string }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -22,10 +24,12 @@ jobs:
id: calculate-version
uses: bitshifted/git-auto-semver@v1
with:
main_branch: main
main_branch: release
create_tag: true
tag_prefix: "v"
release:
needs: [versioning]
uses: ./.github/workflows/release.yml
secrets: inherit
with:
current-tag: ${{ needs.versioning.outputs.current-tag }}

0 comments on commit 349b755

Please sign in to comment.