seitime-frappe/.github/workflows/on_release.yml
Akhil Narang a390992408
chore: python3.13 support (#28624)
* chore: python3.13 support

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* chore: bump pydantic

```
  error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
        = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
        = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* chore: bump uuid-utils

https://katb.in/ahaqabugefo

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* chore: bump RestrictedPython

7.4 has support for py3.13
https://restrictedpython.readthedocs.io/en/latest/changes.html#id1

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* fix(deprecation_dumpster): import functools uncondtionally

Used here: 60f0b1d5c7/frappe/deprecation_dumpster.py (L177C10-L177C19)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* chore(docref): improve error message

* fix: error on unability to hash; TypeError expected

* fix: migrate from 3.10 onwards

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: David <dgx.arnold@gmail.com>
2024-12-04 15:35:06 +00:00

65 lines
1.9 KiB
YAML

name: 'Release'
on:
release:
types: [released]
permissions:
contents: read
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
build-release-and-publish:
name: 'Build and Publish Assets built for Releases'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: 'frappe'
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Set up bench and build assets
run: |
npm install -g yarn
pip3 install -U frappe-bench
bench -v init frappe-bench --no-procfile --no-backups --skip-assets --skip-redis-config-generation --python $(which python) --frappe-path $GITHUB_WORKSPACE/frappe
cd frappe-bench && bench build
- name: Package assets
run: |
mkdir -p $GITHUB_WORKSPACE/build
tar -cvpzf $GITHUB_WORKSPACE/build/assets.tar.gz ./frappe-bench/sites/assets/frappe/dist
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.1
- name: Upload built Assets to Release
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: build/assets.tar.gz
asset_name: assets.tar.gz
asset_content_type: application/octet-stream
docker-release:
name: 'Trigger Docker build on release'
runs-on: ubuntu-latest
permissions:
contents: none
container:
image: alpine:latest
steps:
- name: curl
run: |
apk add curl bash
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.CI_PAT }}" https://api.github.com/repos/frappe/frappe_docker/actions/workflows/build_stable.yml/dispatches -d '{"ref":"main"}'