CI: GitLab CI durch Gitea Actions ersetzt
Some checks failed
Build Maubot Plugin / build (push) Failing after 1m3s
Build Maubot Plugin / release (push) Has been skipped

This commit is contained in:
2026-04-15 22:49:26 +02:00
parent 96407abe98
commit c8163edd2d
2 changed files with 63 additions and 18 deletions

View File

@@ -0,0 +1,63 @@
name: Build Maubot Plugin
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
container:
image: dock.mau.dev/maubot/maubot:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Determine version
id: version
run: |
if [ -n "$GITHUB_REF_NAME" ] && echo "$GITHUB_REF_NAME" | grep -q '^v'; then
VERSION="${GITHUB_REF_NAME#v}"
else
SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-8)
VERSION="${GITHUB_REF_NAME}-${SHORT_SHA}"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Building version: $VERSION"
- name: Build .mbp plugin
run: mbc build -o "cloud.catgirl.ntfy-${{ steps.version.outputs.version }}.mbp"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: maubot-ntfy-plugin
path: "*.mbp"
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: maubot-ntfy-plugin
- name: Create Gitea Release
uses: actions/forgejo-release@v2
with:
direction: upload
url: ${{ github.server_url }}
repo: ${{ github.repository }}
tag: ${{ github.ref_name }}
title: "Release ${{ github.ref_name }}"
token: ${{ secrets.REGISTRY_TOKEN }}
release-dir: .
release-notes: |
Maubot ntfy Plugin ${{ github.ref_name }}
Install the `.mbp` file via the Maubot admin interface.

View File

@@ -1,18 +0,0 @@
stages:
- build
build:
image: dock.mau.dev/maubot/maubot:latest
stage: build
script:
- |
if [ -n "$CI_COMMIT_TAG" ]; then
VERSION="$CI_COMMMIT_TAG"
else
VERSION="$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
fi
- mbc build -o cloud.catgirl.ntfy-$VERSION.mbp
artifacts:
paths:
- "*.mbp"
expire_in: "1 month"