-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Make flank release more automatically (#1352)
Fixes #1346 ## Test Plan > How do we know the code works? 1. Create release notes job (this which generates documentation and changelog) will run each 1st day of the month 2. After merge Pr with changelog 3. Flank-release bot will push the tag with next version to repository 4. Then release job will run as usual ## Checklist - [x] Documented - [x] At schedule to run release job at 1st day of the month - [x] Create job which will push release tag after merge PR
- Loading branch information
1 parent
35beb6d
commit b4679f6
Showing
3 changed files
with
45 additions
and
2 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,34 @@ | ||
name: Create new release | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') && contains(github.event.pull_request.user.login, 'flank-release[bot]') && contains(github.event.pull_request.title, 'release notes for') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.FLANK_RELEASE_APP_ID }} | ||
private_key: ${{ secrets.FLANK_RELEASE_PRIVATE_KEY }} | ||
|
||
- name: Gradle Build flankScripts and add it to PATH | ||
run: | | ||
./flank-scripts/bash/buildFlankScripts.sh | ||
echo "./flank-scripts/bash" >> $GITHUB_PATH | ||
- name: Set next release tag variable | ||
run: | | ||
TAG=$(flankScripts ci nextReleaseTag --token=${{ secrets.GITHUB_TOKEN }}) | ||
echo "NEXT_RELEASE_TAG=$(echo $TAG)" >> $GITHUB_ENV | ||
- name: Push tag | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v5 | ||
with: | ||
github_token: ${{ steps.generate-token.outputs.token }} | ||
custom_tag: ${{ env.NEXT_RELEASE_TAG }} | ||
tag_prefix: '' |
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