Skip to content

Commit

Permalink
Merge pull request #2 from spyrkob/add_workflows
Browse files Browse the repository at this point in the history
Add GH workflows
  • Loading branch information
spyrkob authored Aug 7, 2024
2 parents 0b3a6c1 + 1611b63 commit 72824e2
Show file tree
Hide file tree
Showing 3 changed files with 82 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: Component checker
# Open the PR to do the PR from
# the wildfly-extras/wildfly-channel repository
release:
current-version:
next-version:
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build

on:
push:
branches:
- main
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'

jobs:
build:
name: Build-JDK${{ matrix.jdk }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk: [ 11, 21 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
java-version: "${{ matrix.jdk }}"
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B clean install
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Component Checker 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 "Component Checker CI"
git config --global user.email "bspyrkos@redhat.com"
git checkout -b release
mvn -B release:prepare -Pjboss-release -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
git checkout ${{github.base_ref}}
git rebase release
#mvn -B release:perform -Pjboss-release
git push
git push --tags

0 comments on commit 72824e2

Please sign in to comment.