Some checks failed
Build and Release Maubot Plugin / Build Plugin (push) Failing after 26s
73 lines
2.0 KiB
YAML
73 lines
2.0 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
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Install Dependencies
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install maubot
|
|
|
|
- name: Build Plugin
|
|
run: |
|
|
mbc build .
|
|
env:
|
|
MB_PLUGIN_DIR: ${{ github.workspace }}
|
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
|
|
|
- name: Upload Build Artifact
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
|
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
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
|
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 |