Skip to content

Commit

Permalink
Create release workflow
Browse files Browse the repository at this point in the history
CMK-14985
  • Loading branch information
SoloJacobs committed Nov 13, 2023
1 parent b122f1b commit a8f9702
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 6 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
---
name: "Upload all artifacts"

name: "Release"
# Careful! This pushes a git tag to GitHub! The release itself is private.
on:
push:
tags:
"**"
workflow_dispatch:
inputs:
tag:
description: >
Tag, which is set by the this GitHub workflow.
Should follow SemVer and is not allowed to exist already.
required: true
type: string

jobs:
tests:
Expand All @@ -15,8 +20,33 @@ jobs:
uses: ./.github/workflows/robotmk_build.yaml
release:
runs-on: ubuntu-latest
needs: [build_rcc, build_robotmk]
needs: [tests, build_rcc, build_robotmk]
steps:
- uses: actions/checkout@v4 # Determines the ref, which is used for the
# release. For setting a different ref, all `needs` jobs need to be
# adjusted. Currently, everything uses the default branch.

- uses: actions/download-artifact@v3

- run: zip -r executables.zip artifact

- name: "Push release tag"
# This is publicly visible and needs to be manually fixed if any
# consecutive step fails.
run: |
git tag ${{ inputs.tag }} # Fails, if tag exists.
git push origin ${{ inputs.tag }}
- uses: ncipollo/[email protected]
with:
allowUpdates: false
artifacts: "executables.zip"
replacesArtifacts: true
removeArtifacts: true
prerelease: true
draft: true
body: ""
artifactErrorsFailBuild: true
updateOnlyUnreleased: true
makeLatest: false
tag: ${{ inputs.tag }}
1 change: 1 addition & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Summary

- [Consulting](./consulting.md)
- [Development](./development.md)
22 changes: 22 additions & 0 deletions book/src/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Development

These are internal notes.

## Release

The release is triggered via the workflow `.github/workflows/release.yaml`. Before executing the
workflow the binaries
* the main branch needs to be in a sane state and
* the binaries should be manually tested.

TODO: Replace manual tests by integration tests.

The workflow can be triggered via the Action menu. Once the workflow is complete, a draft release is
available. Some basic sanity checks:
* Is the draft body correct?
* Is the title correct?
* Does `executables.zip` contain the correct binaries?

In order to use the new release with `Checkmk`, the `omd` package `robotmk` needs to be updated. The
earliest release of `Checkmk`, which contains this `omd` package is the daily `2023.11.14`. Note,
the bakery plugin is enterprise-only.

0 comments on commit a8f9702

Please sign in to comment.