-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (51 loc) · 1.53 KB
/
plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Modoboa rspamd plugin
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
branches: [ master ]
types: [ published ]
env:
POSTGRES_HOST: localhost
jobs:
release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build packages
run: |
sudo apt-get install librrd-dev rrdtool libssl-dev gettext
python -m pip install --upgrade pip build
pip install -r requirements.txt
cd ..
git clone https://github.com/modoboa/modoboa.git
cd modoboa
python setup.py develop
cd ../modoboa-rspamd/modoboa_rspamd
django-admin compilemessages
cd ..
python -m build
- name: Publish to Test PyPI
if: endsWith(github.event.ref, '/master')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish distribution to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip_existing: true