-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(odoo): github action to publish odoo wheel
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Publish Odoo Packages | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 8 * * 1" | ||
|
||
env: | ||
RELEASE_TAG: index | ||
|
||
jobs: | ||
build: | ||
name: Build Odoo Packages | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
strategy: | ||
matrix: | ||
odoo_version: | ||
- "17.0" | ||
- "16.0" | ||
- "15.0" | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
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 | ||
uses: AButler/[email protected] | ||
with: | ||
repo-token: ${{ github.token }} | ||
release-tag: ${{ env.RELEASE_TAG }} | ||
files: odoo/dist/* | ||
|
||
publish: | ||
name: Publish Packages | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
uses: ./.github/workflows/pypi.yml |