Files
maubot-hoarder/.gitea/workflows/build-and-release.yml
MrRaph_ 1a58e61d36
Some checks failed
Build and Release Maubot Plugin / Build Plugin (push) Failing after 39s
.
2024-12-03 16:14:28 +01:00

62 lines
1.7 KiB
YAML

name: Build and Release Maubot Plugin
on:
push:
tags:
- '*'
jobs:
build:
name: Build Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install maubot
- name: Build Plugin
run: |
mbc build .
env:
MB_PLUGIN_DIR: ${{ github.workspace }}
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: plugin
path: fr.mrraph.hoarder-bot-*.mbp
- name: Create Release
uses: gitea/create-release@v1
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
with:
gitea_url: https://git.mrraph.fr # Remplacez par l'URL de votre Gitea
token: ${{ secrets.TOKEN }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
tag: ${{ github.ref_name }}
name: "Release ${{ github.ref_name }}"
body: |
## Description
Plugin Maubot compilé à partir du tag `${{ github.ref_name }}`.
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: fr.mrraph.hoarder-bot-*.mbp
asset_name: r.mrraph.hoarder-bot-${{ github.ref_name }}.mbp
asset_content_type: application/octet-stream