-
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.
## what * Added release branches
- Loading branch information
Showing
2 changed files
with
59 additions
and
11 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "shared auto release" | ||
name: "Shared auto release" | ||
on: | ||
workflow_call: | ||
inputs: | ||
|
@@ -12,13 +12,6 @@ on: | |
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: auto-release.yml | ||
type: string | ||
runs-on: | ||
description: "Overrides job runs-on setting (json-encoded list)" | ||
type: string | ||
|
@@ -38,10 +31,24 @@ jobs: | |
app-id: ${{ vars.BOT_GITHUB_APP_ID }} | ||
private-key: ${{ secrets.BOT_GITHUB_APP_PRIVATE_KEY }} | ||
|
||
- name: Context | ||
id: context | ||
uses: cloudposse/[email protected] | ||
with: | ||
query: .${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
config: |- | ||
true: | ||
config: auto-release.yml | ||
latest: true | ||
false: | ||
config: auto-release-hotfix.yml | ||
latest: false | ||
# Drafts your next Release notes as Pull Requests are merged into "main" | ||
- uses: cloudposse/github-action-auto-release@v1 | ||
- uses: cloudposse/github-action-auto-release@v2 | ||
with: | ||
token: ${{ steps.github-app.outputs.token }} | ||
publish: ${{ inputs.publish }} | ||
prerelease: ${{ inputs.prerelease }} | ||
token: ${{ steps.github-app.outputs.token }} | ||
config-name: ${{ inputs.config-name }} | ||
latest: ${{ steps.context.outputs.latest }} | ||
config-name: ${{ steps.context.outputs.config }} |
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,41 @@ | ||
name: "Shared release branches" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
runs-on: | ||
description: "Overrides job runs-on setting (json-encoded list)" | ||
type: string | ||
required: false | ||
default: '["ubuntu-latest"]' | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
major-release-tagger: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
environment: 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 }} | ||
|
||
- uses: cloudposse/github-action-major-release-tagger@v2 | ||
with: | ||
token: ${{ steps.github-app.outputs.token }} | ||
|
||
release-branch-manager: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
environment: 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 }} | ||
|
||
- uses: cloudposse/github-action-release-branch-manager@v2 | ||
with: | ||
token: ${{ steps.github-app.outputs.token }} |