Release #5
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
name: Release | |
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 0 * * *' | |
inputs: | |
milestone: | |
description: 'Milestone to use as version' | |
type: string | |
required: true | |
workflow_call: | |
inputs: | |
milestone: | |
description: 'Milestone to use as version' | |
type: string | |
required: true | |
jobs: | |
delete_old_snapshots: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Delete older snapshots | |
uses: smartsquaregmbh/[email protected] | |
with: | |
organization: assimbly | |
type: maven | |
keep: 0 | |
semver-pattern: "${{inputs.milestone}}" | |
names: | | |
org.assimbly.base | |
org.assimbly.common-base | |
org.assimbly.camel-base | |
org.assimbly.spring-base | |
org.assimbly.activemq-base | |
org.assimbly.test-base | |
org.assimbly.database-drivers | |
org.assimbly.camel-components | |
org.assimbly.utils | |
org.assimbly.extra | |
org.assimbly.extra | |
release-jars: | |
needs: delete_old_snapshots | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }} | |
ref: ${{ github.ref_name }} | |
fetch-depth: 0 | |
token: ${{ secrets.RELEASE_TOKEN }} | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Maven settings.xml | |
uses: whelk-io/maven-settings-xml-action@v20 | |
with: | |
repositories: > | |
[ | |
{ | |
"id": "maven", | |
"name": "Maven Central", | |
"url": "https://repo1.maven.org/maven2" | |
}, | |
{ | |
"id": "github", | |
"name": "Assimbly Base Repository", | |
"url": "https://maven.pkg.github.com/assimbly/base", | |
"snapshots": { | |
"enabled": "true" | |
} | |
}, | |
{ | |
"id": "aurea", | |
"name": "Aurea Sonic Repository", | |
"url": "https://int-factory.aurea.com/nexus/content/repositories/sonic-releases/" | |
} | |
] | |
servers: > | |
[ | |
{ | |
"id": "github", | |
"username": "assimbly", | |
"password": "${{ secrets.MAVEN_TOKEN }}" | |
} | |
] | |
- name: Publish package | |
run: mvn --batch-mode deploy -DskipTests | |
env: | |
GITHUB_TOKEN: ${{ secrets.MAVEN_TOKEN }} | |