Skip to content

Commit

Permalink
Improved release scripts: (#307)
Browse files Browse the repository at this point in the history
- Removed hard coded branch for release.
- Build only master branch by default.
- Validate if release contains SNAPSHOT version.
  • Loading branch information
radcortez authored May 8, 2020
1 parent 45749d8 commit a41f2a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: SmallRye Build

on:
push:
branches:
- master
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- name: Validate version
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
run: |
echo '::error::Cannot release a SNAPSHOT version.'
exit 1
- uses: radcortez/milestone-review-action@master
name: milestone review
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
git config --global user.email "[email protected]"
git checkout -b release
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -s maven-settings.xml
git checkout master
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -Prelease -s maven-settings.xml
git push
Expand Down

0 comments on commit a41f2a7

Please sign in to comment.