Skip to content

Dont-code Services release #45

Dont-code Services release

Dont-code Services release #45

Workflow file for this run

name: Dont-code Services release
on:
workflow_dispatch:
inputs:
version:
description: The version of the release
required: true
type: string
branch:
description: The branch to use. Only main is released, nothing is deployed
required: false
default: Development
type: choice
options:
- Development
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout common repositories
uses: actions/checkout@v4
with:
repository: dont-code/core
path: core
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- uses: actions/checkout@v4
with:
repository: dont-code/common-quarkus-mongo
path: common-quarkus-mongo
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Create mongo Docker container
id: build_mongo_docker
uses: DigiPie/mongo-action@v2.0.1
with:
image_version: latest
port: 27017
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode --update-snapshots install
working-directory: core/java
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-core.version
mvn --batch-mode --update-snapshots install
working-directory: common-quarkus-mongo
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Build Ide-services
uses: actions/checkout@v4
with:
repository: dont-code/ide-services
path: ide-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-common.version
mvn --batch-mode --update-snapshots install
working-directory: ide-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Build Preview-services
uses: actions/checkout@v4
with:
repository: dont-code/preview-services
path: preview-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-common.version
mvn --batch-mode --update-snapshots install
working-directory: preview-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Build Data services
uses: actions/checkout@v4
with:
repository: dont-code/data-services
path: data-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-common.version
mvn --batch-mode --update-snapshots install
working-directory: data-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Project services
uses: actions/checkout@v4
with:
repository: dont-code/project-services
path: project-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode --update-snapshots install
working-directory: project-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Create release
if: ${{ success() && inputs.branch == 'main'}}
uses: vimtor/action-zip@v1
with:
files: ide-services/target/ide-services-runner.jar preview-services/target/preview-services-runner.jar data-services/target/data-services-runner.jar project-services/target/project-services-runner.jar
dest: dont-code-release-runners.zip
- name: Create release
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
dont-code-release-runners.zip
- name: Create release
if: ${{ success() && inputs.branch == 'main'}}
uses: softprops/action-gh-release@master
with:
name: v${{inputs.version}}
tag_name: v${{inputs.version}}
files: |
checksum.txt
dont-code-release-runners.zip