Skip to content

Release :: Build (Extended Services) #2

Release :: Build (Extended Services)

Release :: Build (Extended Services) #2

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: "Release :: Build (Extended Services)"
on:
workflow_dispatch:
inputs:
dry_run:
type: boolean
required: true
description: "Dry run mode"
base_ref:
type: string
required: true
description: "Tag associated with the release"
release_candidate_version:
type: string
required: true
description: "Tag associated with the release"
env:
KIE_TOOLS_BUILD__runLinters: "false"
KIE_TOOLS_BUILD__runTests: "false"
KIE_TOOLS_BUILD__runEndToEndTests: "false"
KIE_TOOLS_BUILD__buildContainerImages: "true"
jobs:
extended_services:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14, windows-latest]
steps:
- name: "Support longpaths (Windows only)"
if: runner.os == 'Windows'
run: git config --system core.longpaths true
- name: "Checkout @ GitHub default"
uses: actions/checkout@v3
- name: "Checkout @ Simulated squashed-merge if PR"
uses: ./.github/actions/checkout-pr
with:
ref: ${{ inputs.base_ref }}
- name: "Setup environment"
id: setup_env
uses: ./.github/actions/setup-env
- name: "Bootstrap"
id: bootstrap
uses: ./.github/actions/bootstrap
with:
pnpm_filter_string: -F @kie-tools/extended-services...
- name: "Build"
shell: bash
run: |
pnpm ${{ steps.bootstrap.outputs.pnpm_filter_string }} build:prod
- name: Import GPG key
if: github.event_name != 'pull_request'
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
- name: "Setup Extended Services for macOS x86 artifacts"
id: macos_setup_artifact
if: ${{ runner.os == 'macOS' && runner.arch != 'arm64' && !inputs.dry_run }}
shell: bash
env:
RELEASE_CANDIDATE_VERSION: ${{ inputs.release_candidate_version }}
run: |
ARTIFACT_ZIP_FILE="./extended-services-release-artifacts/incubator-kie-$RELEASE_CANDIDATE_VERSION-sandbox-extended-services-macOS-x86.zip"
echo "ARTIFACT_ZIP_FILE=$ARTIFACT_ZIP_FILE" >> "$GITHUB_OUTPUT"
mkdir ./extended-services-release-artifacts
zip $ARTIFACT_ZIP_FILE ./packages/extended-services/dist/darwin/Kogito.dmg
- name: "Sign Extended Services for macOS x86 artifact"
if: ${{ runner.os == 'macOS' && runner.arch != 'arm64' && !inputs.dry_run }}
shell: bash
env:
ARTIFACT_ZIP_FILE: ${{ steps.macos_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
gpg --no-tty --batch --sign --pinentry-mode loopback --output $ARTIFACT_ZIP_FILE.asc --detach-sig $ARTIFACT_ZIP_FILE
shasum -a 512 $ARTIFACT_ZIP_FILE > $ARTIFACT_ZIP_FILE.sha512
- name: "Upload Extended Services for macOS x86 artifact"
if: ${{ runner.os == 'macOS' && runner.arch != 'arm64' && !inputs.dry_run }}
shell: bash
env:
SVN_USERNAME: svn_dist_kie
SVN_PASSWORD: ${{ secrets.svc-dist-kie-pass }}
RELEASE_CANDIDATE_VERSION: ${{ inputs.release_candidate_version }}
ARTIFACT_ZIP_FILE: ${{ steps.macos_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/kie/$RELEASE_CANDIDATE_VERSION/ svn-kie
cp ./extended-services-release-artifacts/* svn-kie
cd svn-kie
svn add . --force
svn ci --non-interactive --no-auth-cache --username "$SVN_USERNAME" --password "$SVN_PASSWORD" -m "Apache KIE $RELEASE_CANDIDATE_VERSION Extended Services for macOS x86 artifact"
rm -rf svn-kie
- name: "Setup Extended Services for Windows artifacts"
id: windows_setup_artifact
if: ${{ runner.os == 'Windows' && !inputs.dry_run }}
shell: pwsh
env:
RELEASE_CANDIDATE_VERSION: ${{ inputs.release_candidate_version }}
run: |
ARTIFACT_ZIP_FILE="./extended-services-release-artifacts/incubator-kie-$RELEASE_CANDIDATE_VERSION-sandbox-extended-services-windows-x86.zip"
echo "ARTIFACT_ZIP_FILE=$ARTIFACT_ZIP_FILE" >> "$GITHUB_OUTPUT"
mkdir ./extended-services-release-artifacts
zip $ARTIFACT_ZIP_FILE ./packages/extended-services/dist/win32/kie_sandbox_extended_services.exe
- name: "Sign Extended Services for Windows artifact"
if: ${{ runner.os == 'Windows' && !inputs.dry_run }}
shell: pwsh
env:
ARTIFACT_ZIP_FILE: ${{ steps.windows_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
gpg --no-tty --batch --sign --pinentry-mode loopback --output $ARTIFACT_ZIP_FILE.asc --detach-sig $ARTIFACT_ZIP_FILE
shasum -a 512 $ARTIFACT_ZIP_FILE > $ARTIFACT_ZIP_FILE.sha512
- name: "Upload Extended Services for Windows artifact"
if: ${{ runner.os == 'Windows' && !inputs.dry_run }}
shell: pwsh
env:
SVN_USERNAME: svn_dist_kie
SVN_PASSWORD: ${{ secrets.svc-dist-kie-pass }}
RELEASE_CANDIDATE_VERSION: ${{ inputs.release_candidate_version }}
ARTIFACT_ZIP_FILE: ${{ steps.windows_setup_artifact.outputs.ARTIFACT_ZIP_FILE }}
run: |
svn co --depth=empty https://dist.apache.org/repos/dist/dev/incubator/kie/$RELEASE_CANDIDATE_VERSION/ svn-kie
cp ./extended-services-release-artifacts/* svn-kie
cd svn-kie
svn add . --force
svn ci --non-interactive --no-auth-cache --username "$SVN_USERNAME" --password "$SVN_PASSWORD" -m "Apache KIE $RELEASE_CANDIDATE_VERSION Extended Services for Windows artifact"
rm -rf svn-kie