-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify process of making releases (#582)
* Add workflow for (1) drafting release, (2) uploading Docker images * Allow manual trigger for docker image uploads and update path to JARs for draft release * Update release steps in documentation * Skip maven tests in CI for draft release and Docker image * Explicitly mention in 'Release steps' that you need to make a new branch
- Loading branch information
Showing
3 changed files
with
96 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release Docker images | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && github.event.prerelease == false) | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Build JARs | ||
run: mvn -Dmaven.test.skip=true package | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push Knowledge Directory Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./knowledge-directory | ||
platforms: linux/amd64, linux/arm64 | ||
tags: ghcr.io/tno/knowledge-engine/knowledge-directory:${{ github.event.release.tag_name }} | ||
push: true | ||
- name: Build and push Smart Connector Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./smart-connector-rest-dist | ||
platforms: linux/amd64, linux/arm64 | ||
tags: ghcr.io/tno/knowledge-engine/smart-connector:${{ github.event.release.tag_name }} | ||
push: true | ||
- name: Build and push Admin UI Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./admin-ui | ||
platforms: linux/amd64, linux/arm64 | ||
tags: ghcr.io/tno/knowledge-engine/admin-ui:${{ github.event.release.tag_name }} | ||
push: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Make draft release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version for new release (X.Y.Z)" | ||
required: true | ||
type: string | ||
|
||
env: | ||
MAVEN_OPTS: -Dmaven.test.skip=true -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true | ||
MAVEN_CLI_OPTS: --batch-mode --errors --fail-at-end --show-version | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: maven:3.9.9-eclipse-temurin-17-focal | ||
options: --user 1001 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build JARs | ||
run: mvn $MAVEN_CLI_OPTS package | ||
- name: Create tag | ||
run: | | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git tag -a ${{ inputs.version }} -m ${{ inputs.version }} | ||
git push origin ${{ inputs.version }} | ||
- name: Draft release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
working-directory: ${{ github.workspace }} | ||
files: | | ||
smart-connector-rest-dist/target/smart-connector-rest-dist-${{ inputs.version }}-with-dependencies.jar | ||
knowledge-directory/target/knowledge-directory-${{ inputs.version }}-with-dependencies.jar | ||
tag_name: ${{ inputs.version }} | ||
draft: true | ||
generate_release_notes: true | ||
make_latest: true |
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