Skip to content

Commit

Permalink
GHA: github release workflow (#457)
Browse files Browse the repository at this point in the history
A new GHA workflow that publishes gitlint when new gitlint releases are
created on github.
  • Loading branch information
jorisroovers committed Mar 7, 2023
1 parent 09a6f0b commit 5b7d1e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Github Release Publish
run-name: "Github Release Publish (tag=${{github.ref_name}})"

on:
release:
types: [published]

jobs:
publish-release:
uses: ./.github/workflows/publish-release.yml
secrets: inherit # pass all secrets (required to access secrets in a called workflow)
with:
pypi_target: "test.pypi.org"
repo_release_ref: ${{ github.ref_name }}
3 changes: 3 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Publish Release
run-name: "Publish Release (pypi_target=${{ inputs.pypi_target }}, repo_release_ref=${{ inputs.repo_release_ref }})"

on:
# Trigger release workflow from other workflows (e.g. release dev build as part of CI)
workflow_call:
inputs:
pypi_target:
Expand All @@ -13,6 +14,8 @@ on:
description: "Gitlint git reference to publish release for"
type: string
default: "main"

# Manually trigger a release
workflow_dispatch:
inputs:
pypi_target:
Expand Down

0 comments on commit 5b7d1e2

Please sign in to comment.