-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "auto-release" | ||
on: | ||
workflow_call: | ||
inputs: | ||
prerelease: | ||
description: "Boolean indicating whether this release should be a prerelease" | ||
required: false | ||
default: false | ||
type: string | ||
publish: | ||
description: "Whether to publish a new release immediately" | ||
required: false | ||
default: false | ||
type: string | ||
config-name: | ||
description: | | ||
If your workflow requires multiple release-drafter configs it is helpful to override the config-name. | ||
The config should still be located inside `.github` as that's where we are looking for config files. | ||
required: false | ||
default: configs/draft-release.yml | ||
type: string | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: auto-release | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: github-app | ||
with: | ||
app-id: ${{ vars.BOT_GITHUB_APP_ID }} | ||
private-key: ${{ secrets.BOT_GITHUB_APP_PRIVATE_KEY }} | ||
|
||
# Drafts your next Release notes as Pull Requests are merged into "main" | ||
- uses: cloudposse/github-action-auto-release@v1 | ||
with: | ||
publish: ${{ inputs.publish }} | ||
prerelease: ${{ inputs.prerelease }} | ||
token: ${{ steps.github-app.outputs.token }} | ||
config-name: ${{ inputs.config-name }} |