Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request:
branches: [ main ]
workflow_call:
inputs:
checkout-ref:
Comment thread
yejseo01 marked this conversation as resolved.
required: false
type: string
default: ''

concurrency:
group: ci-${{ github.head_ref || github.run_id }}
Expand All @@ -17,6 +22,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.checkout-ref || github.ref }}

- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
Expand Down Expand Up @@ -46,6 +53,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.checkout-ref || github.ref }}

- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
push:
tags:
- v[0-9].[0-9]+.[0-9]+
workflow_dispatch:
inputs:
release-tag:
description: Release tag, for example v1.2.3
required: true
type: string
pre-release:
description: Pre-release
required: false
type: boolean
default: false

concurrency:
group: release-${{ github.head_ref || github.run_id }}
Expand All @@ -15,15 +26,18 @@ permissions:
jobs:
ci:
uses: ./.github/workflows/ci.yml
with:
checkout-ref: ${{ inputs['release-tag'] || github.ref }}
secrets: inherit

release:
needs: ci
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
ref: ${{ inputs['release-tag'] || github.ref }}
Comment thread
yejseo01 marked this conversation as resolved.
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version-file: 'go.mod'
Expand All @@ -34,3 +48,10 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ inputs['release-tag'] || github.ref_name }}
- name: Mark release as pre-release
if: ${{ inputs['pre-release'] }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs['release-tag'] || github.ref_name }}
run: gh release edit "$RELEASE_TAG" --prerelease
Comment thread
yejseo01 marked this conversation as resolved.
Outdated
Loading