ci: add workflow for automated GitHub release
authorPetr Štetiar <ynezz@true.cz>
Thu, 19 Oct 2023 04:09:25 +0000 (04:09 +0000)
committerPetr Štetiar <ynezz@true.cz>
Wed, 1 Nov 2023 12:26:18 +0000 (12:26 +0000)
Implement a GitHub Actions workflow for automated project releases.

The workflow triggers on Git tags, ensuring that a GitHub release is
created whenever a new tag is pushed.

That new release is going to be created in draft and pre-release mode
and needs to be manually promoted to the proper release, once its
decided, that its good enough and prepared.

This is a start of a streamlined and consistent release process for
GitHub, reducing manual intervention.

Acked-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
.github/workflows/github-release.yml [new file with mode: 0644]

diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml
new file mode 100644 (file)
index 0000000..55d01f8
--- /dev/null
@@ -0,0 +1,24 @@
+name: Create GitHub release
+
+permissions:
+  contents: write
+
+on:
+  push:
+    tags:
+      - "v*"
+  workflow_dispatch:
+
+jobs:
+  release:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Release
+        uses: softprops/action-gh-release@v1
+        with:
+          draft: true
+          prerelease: true