-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new feature to create a github release
- Loading branch information
1 parent
4f7fbd7
commit 563a2ae
Showing
18 changed files
with
549 additions
and
195 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,51 @@ | ||
name: Create Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
draft: | ||
type: choice | ||
description: "Create the release as draft" | ||
options: | ||
- "yes" | ||
- "no" | ||
required: true | ||
force: | ||
type: choice | ||
description: "Force the creation of a release (event if no PR are found)" | ||
options: | ||
- "yes" | ||
- "no" | ||
required: true | ||
|
||
jobs: | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # we need this because fetch-tags=true and because of a GHA bug: https://github.com/actions/checkout/issues/1471 | ||
fetch-tags: true | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
- name: Run build | ||
run: | | ||
make build | ||
- name: Run | ||
run: | | ||
OPTIONS="" | ||
if test "${{ github.event.inputs.draft }}" == "yes"; then | ||
OPTIONS="${OPTIONS} --release-draft" | ||
fi | ||
if test "${{ github.event.inputs.force }}" == "yes"; then | ||
OPTIONS="${OPTIONS} --dont-increment-if-no-pr" | ||
fi | ||
echo "OPTIONS=${OPTIONS}" | ||
./cmd/github-create-next-semantic-release/github-create-next-semantic-release --log-level=DEBUG ${OPTIONS} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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
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,9 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/fabien-marty/github-next-semantic-version/internal/infra/controllers/cli" | ||
) | ||
|
||
func main() { | ||
cli.CreateReleaseMain() | ||
} |
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ import ( | |
) | ||
|
||
func main() { | ||
cli.Main() | ||
cli.NextVersionMain() | ||
} |
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
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
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
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
Oops, something went wrong.