-
Notifications
You must be signed in to change notification settings - Fork 9
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
8 changed files
with
126 additions
and
169 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
name: Create tag and trigger deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
bump: | ||
name: Create tag and release | ||
runs-on: ubuntu-latest | ||
if: "contains(github.event.head_commit.message, 'chore(release)')" | ||
outputs: | ||
tag: ${{ steps.tag.outputs.tag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get tag value | ||
id: tag | ||
run: | | ||
TAG=$(grep -oP '\d+\.\d+\.\d+' <<< '${{ github.event.head_commit.message }}') | ||
echo $TAG | ||
echo "::set-output name=tag::${TAG}" | ||
- name: Create and push tag | ||
run: | | ||
git tag ${{ steps.tag.outputs.tag }} | ||
git push origin --tags | ||
- name: Create release | ||
uses: lidofinance/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.tag.outputs.tag }} | ||
|
||
deploy-trigger: | ||
needs: bump | ||
name: Trigger build and PR creation in the infra-mainnet | ||
if: "contains(github.event.head_commit.message, 'chore(release)')" | ||
uses: ./.github/workflows/ci-prod.yml | ||
secrets: inherit | ||
with: | ||
tag: ${{ needs.bump.outputs.tag}} |
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,30 @@ | ||
name: Prepare release | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
prepare-release: | ||
name: Prepare release and create pre-release PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Bump version and update CHANGELOG.MD | ||
id: changelog | ||
uses: lidofinance/[email protected] | ||
with: | ||
git-message: "chore(release): {version}" | ||
tag-prefix: "" | ||
output-file: "CHANGELOG.md" | ||
version-file: package.json | ||
version-path: version | ||
release-count: 10 # save all releases in the CHANGELOG.md | ||
git-push: false | ||
skip-on-empty: false | ||
|
||
- name: Create Pull Request | ||
uses: lidofinance/create-pull-request@v4 | ||
with: | ||
branch: pre-release-${{ steps.changelog.outputs.version }} | ||
title: "chore(release): ${{ steps.changelog.outputs.version }}" | ||
body: "This PR is generated automatically.\nMerge it with **Rebase and merge** option or with the **Squash and merge** keeping default commit message (CRUCIAL) for the automatic tag creation.\nIf you don't need this PR than close it and **delete source branch**! " |
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