Skip to content

Prepare new release #17

Prepare new release

Prepare new release #17

Workflow file for this run

name: build-release
on:
push:
tags:
- 'v*'
- '!v*[a-z]'
jobs:
build-release:
name: Build Release Package
runs-on: ubuntu-latest
container:
image: checkmk/check-mk-raw:2.3.0-latest
permissions:
contents: write
env:
OMD_ROOT: /omd/sites/cmk
OMD_SITE: cmk
CMK_SITE_ID: cmk
WORKSPACE: ${{ github.workspace }}
steps:
- name: Initialize Checkmk Site
run: /docker-entrypoint.sh /bin/true
- uses: actions/checkout@v4
- name: Parse Package File
run: |
NAME=$(python3 -c 'print(eval(open("package").read())["name"])')
VERSION=$(python3 -c 'print(eval(open("package").read())["version"])')
echo "CMKPKG_NAME=$NAME" >> "$GITHUB_ENV"
echo "CMKPKG_VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Setup links
run: .devcontainer/symlink.sh
- name: Build Extension
run: |
chown -R cmk:cmk $GITHUB_WORKSPACE
su -l -c "mkp -v package $GITHUB_WORKSPACE/package" cmk
cp /omd/sites/cmk/var/check_mk/packages_local/${CMKPKG_NAME}-${CMKPKG_VERSION}.mkp .
echo "pkgfile=${CMKPKG_NAME}-${CMKPKG_VERSION}.mkp" >> $GITHUB_OUTPUT
id: cmkpkg
- name: Create Release
uses: softprops/action-gh-release@v2
with:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: ${{ steps.cmkpkg.outputs.pkgfile }}