Skip to content

Commit 5b7d1e2

Browse files
committed
GHA: github release workflow (#457)
A new GHA workflow that publishes gitlint when new gitlint releases are created on github.
1 parent 09a6f0b commit 5b7d1e2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/workflows/github-release.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Github Release Publish
2+
run-name: "Github Release Publish (tag=${{github.ref_name}})"
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
publish-release:
10+
uses: ./.github/workflows/publish-release.yml
11+
secrets: inherit # pass all secrets (required to access secrets in a called workflow)
12+
with:
13+
pypi_target: "test.pypi.org"
14+
repo_release_ref: ${{ github.ref_name }}

.github/workflows/publish-release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Publish Release
22
run-name: "Publish Release (pypi_target=${{ inputs.pypi_target }}, repo_release_ref=${{ inputs.repo_release_ref }})"
33

44
on:
5+
# Trigger release workflow from other workflows (e.g. release dev build as part of CI)
56
workflow_call:
67
inputs:
78
pypi_target:
@@ -13,6 +14,8 @@ on:
1314
description: "Gitlint git reference to publish release for"
1415
type: string
1516
default: "main"
17+
18+
# Manually trigger a release
1619
workflow_dispatch:
1720
inputs:
1821
pypi_target:

0 commit comments

Comments
 (0)