Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create release workflow #437

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading