-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 1.89 KB
/
odoo.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Publish Odoo Packages
on:
workflow_dispatch:
schedule:
- cron: "0 8 1 * *"
env:
AWS_S3_ENDPOINT_URL: https://86099e5f6de2cd6346db01f48072efa4.r2.cloudflarestorage.com
MC_ALIAS: r2
BUCKET: wheelhouse
BUCKET_ACCESS_URL: https://wheelhouse.kafai.eu.org
jobs:
build:
name: Build Odoo Packages
runs-on: ubuntu-22.04
permissions:
contents: write
strategy:
matrix:
odoo_version:
- "18.0"
- "17.0"
- "16.0"
steps:
- name: Setup Minio CLI
uses: hostwithquantum/setup-mc@main
with:
alias-name: ${{ env.MC_ALIAS }}
alias-url: ${{ env.AWS_S3_ENDPOINT_URL }}
alias-access-key: ${{ secrets.AWS_ACCESS_KEY_ID }}
alias-secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Wheel
run: pip install wheel
- name: Set Date
id: set_date
run: |
today=$(date -u +%Y%m%d -d '-8 hours')
echo "date=$today" >> "$GITHUB_OUTPUT"
- name: Build Wheel
run: |
tar_file=odoo_${{ matrix.odoo_version }}.${{ steps.set_date.outputs.date }}.tar.gz
wget https://nightly.odoo.com/${{ matrix.odoo_version }}/nightly/tgz/$tar_file
mkdir odoo
tar -xvf $tar_file -C odoo --strip-components=1
cd odoo
python3 setup.py -q bdist_wheel
- name: Upload Artifacts
run: |
cd odoo/dist
mc cp --recursive ./* ${{ env.MC_ALIAS }}/${{ env.BUCKET }}
publish:
name: Publish Packages
needs: build
permissions:
pages: write
id-token: write
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
uses: ./.github/workflows/pypi.yml