Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spyrkob committed Jan 19, 2024
1 parent eb1e71b commit f42526c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: WildFly Prospero
# Open the PR to do the PR from
# the spyrkob/prospero-extras repository
release:
current-version: 1.0.0.Beta1
next-version: 1.0.0.Beta1-SNAPSHOT
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: WildFly Prospero Release

on:
pull_request:
types: [closed]
paths:
- '.github/project.yml'

jobs:
release:
runs-on: ubuntu-latest
name: release
if: ${{github.event.pull_request.merged == true}}
steps:
- uses: radcortez/project-metadata-action@main
name: retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: maven release ${{steps.metadata.outputs.current-version}}
run: |
java -version
git config --global user.name "Prospero Extras CI"
git config --global user.email "[email protected]"
git checkout -b release
mvn -B release:prepare -Pdist,jboss-release -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
git checkout ${{github.base_ref}}
git rebase release
git push
git push --tags

0 comments on commit f42526c

Please sign in to comment.