Implement release as github action (#2452)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
68
.github/workflows/release.yml
vendored
Normal file
68
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
# enable running the workflow manually
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
revision:
|
||||
description: 'Release version'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
rabbitmq:
|
||||
image: rabbitmq:3-management-alpine
|
||||
env:
|
||||
RABBITMQ_DEFAULT_VHOST: /
|
||||
RABBITMQ_DEFAULT_USER: guest
|
||||
RABBITMQ_DEFAULT_PASS: guest
|
||||
ports:
|
||||
- 15672:15672
|
||||
- 5672:5672
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK & Maven Central credentials
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 21
|
||||
cache: 'maven'
|
||||
server-id: central
|
||||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_PASSWORD
|
||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Check file license headers
|
||||
run: mvn license:check -Plicense --batch-mode
|
||||
# - name: Check dependency licenses with dash tool
|
||||
# run: mvn license-tool:license-check -Plicense --projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' --batch-mode
|
||||
- name: Run tests & build javadoc
|
||||
run: mvn clean install javadoc:jar -Dadditionalparam=-Xdoclint:none --batch-mode
|
||||
|
||||
- name: Deploy
|
||||
run: mvn deploy -Ppublish -DskipTests -Drevision=${REVISION} -B --batch-mode
|
||||
env:
|
||||
REVISION: ${{ github.event.inputs.revision }}
|
||||
MAVEN_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}
|
||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||
- name: Tag release
|
||||
run: |
|
||||
git tag -a ${REVISION} -m "Release version ${REVISION}"
|
||||
git push origin ${REVISION}
|
||||
env:
|
||||
REVISION: ${{ github.event.inputs.revision }}
|
||||
1
.github/workflows/stale.yml
vendored
1
.github/workflows/stale.yml
vendored
@@ -1,6 +1,7 @@
|
||||
name: Mark & close stale issues
|
||||
|
||||
on:
|
||||
# enable running the workflow manually
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
4
.github/workflows/trivy-scan.yml
vendored
4
.github/workflows/trivy-scan.yml
vendored
@@ -1,11 +1,11 @@
|
||||
name: Vulnerability Scan
|
||||
|
||||
on:
|
||||
# enable running the workflow manually
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# run every night at 4:00 AM (UTC)
|
||||
- cron: '0 4 * * *'
|
||||
# enable running the workflow manually
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
|
||||
2
.github/workflows/verify-hibernate.yml
vendored
2
.github/workflows/verify-hibernate.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Check file license headers
|
||||
run: mvn license:check --batch-mode
|
||||
run: mvn license:check -Plicense --batch-mode
|
||||
|
||||
- name: Run tests & javadoc
|
||||
run: mvn clean verify javadoc:javadoc --batch-mode -Djpa.vendor=hibernate -Dlogging.level.org.hibernate.collection.spi.AbstractPersistentCollection=ERROR
|
||||
2
.github/workflows/verify.yml
vendored
2
.github/workflows/verify.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Check file license headers
|
||||
run: mvn license:check --batch-mode
|
||||
run: mvn license:check -Plicense --batch-mode
|
||||
|
||||
- name: Run tests & javadoc
|
||||
run: mvn clean verify javadoc:javadoc --batch-mode
|
||||
Reference in New Issue
Block a user