Merge pull request #94 from assimbly/develop #12
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 | ||
Check failure on line 1 in .github/workflows/release.yml GitHub Actions / .github/workflows/release.ymlInvalid workflow file
|
||
on: | ||
workflow_dispatch: | ||
# schedule: | ||
# - cron: '0 0 * * *' | ||
inputs: | ||
branch: | ||
description: 'Branch to use' | ||
type: string | ||
default: 'develop' | ||
milestone: | ||
description: 'Milestone to use as version' | ||
type: string | ||
required: true | ||
workflow_run: | ||
inputs: | ||
branch: | ||
description: 'Branch to use' | ||
type: string | ||
default: 'develop' | ||
milestone: | ||
description: 'Milestone to use as version' | ||
type: string | ||
required: true | ||
jobs: | ||
delete_old_snapshots: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
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 | ||
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: "assimbly/base" | ||
ref: ${{ inputs.branch }} | ||
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@v22 | ||
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 }} | ||