-
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.
- Loading branch information
1 parent
549b4e0
commit 83203b1
Showing
2 changed files
with
60 additions
and
33 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,43 @@ | ||
name: Action - Trigger Release | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: ["fix/ci__fix_release_flow"] | ||
|
||
jobs: | ||
bump: | ||
name: Bump version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cocogitto release | ||
id: release | ||
uses: oknozor/[email protected] | ||
with: | ||
release: true | ||
git-user: "release-bot" | ||
git-user-email: "[email protected]" | ||
|
||
- name: Print version | ||
run: "echo '${{ steps.release.outputs.version }}'" | ||
|
||
- name: Generate Latest Changelog | ||
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > ./docs/LATEST_CHANGELOG.md | ||
|
||
- name: Generate current version | ||
run: echo ${{ steps.release.outputs.version }} > ./build/version | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
draft: false | ||
delete-branch: true | ||
signoff: false | ||
base: main | ||
branch: "release/${{ steps.release.outputs.version }}" | ||
commit-message: "release(version): bump to ${{ steps.release.outputs.version }}" | ||
title: "release(version): Bump to ${{ steps.release.outputs.version }}" | ||
body-path: ./docs/LATEST_CHANGELOG.md |
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,46 +1,30 @@ | ||
name: Release | ||
Name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: ["fix/ci__fix_release_flow"] | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- "release/**" | ||
paths: | ||
- "Cargo.toml" | ||
|
||
jobs: | ||
release: | ||
name: Perform release | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cocogitto release | ||
id: release | ||
uses: oknozor/[email protected] | ||
with: | ||
release: true | ||
git-user: "release-bot" | ||
git-user-email: "[email protected]" | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Print version | ||
run: "echo '${{ steps.release.outputs.version }}'" | ||
|
||
- name: Generate Latest Changelog | ||
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > ./docs/LATEST_CHANGELOG.md | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
draft: false | ||
delete-branch: true | ||
signoff: false | ||
base: main | ||
branch: "release/${{ steps.release.outputs.version }}" | ||
commit-message: "release(version): bump to ${{ steps.release.outputs.version }}" | ||
title: "release(version): Bump to ${{ steps.release.outputs.version }}" | ||
body-path: ./docs/LATEST_CHANGELOG.md | ||
- name: Set output variables | ||
id: vars | ||
run: | | ||
version="$(cat ./build/version)" | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
- name: Upload github release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: ./docs/LATEST_CHANGELOG.md | ||
tag_name: ${{ steps.release.outputs.version }} | ||
tag_name: ${{ steps.vars.outputs.version }} |