68 lines
1.6 KiB
YAML
68 lines
1.6 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@v3
|
|
with:
|
|
name: plugin
|
|
path: fr.mrraph.hoarder-bot-*.mbp
|
|
|
|
release:
|
|
name: Release Plugin
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Download Build Artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: plugin
|
|
|
|
- name: Create Release
|
|
uses: actions/create-release@v1
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
release_name: Hoarder Bot - ${{ github.ref_name }}
|
|
draft: false
|
|
prerelease: false
|
|
body: |
|
|
## Description
|
|
Plugin Hoarder pour Maubot compilé à partir du tag `${{ github.ref_name }}`.
|
|
|
|
- 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: fr.mrraph.hoarder-bot-${{ github.ref_name }}.mbp
|
|
asset_content_type: application/octet-stream
|