build wheel in separate job
This commit is contained in:
parent
9b08ea2813
commit
26a5ddcaf4
1 changed files with 12 additions and 29 deletions
41
.github/workflows/release.yaml
vendored
41
.github/workflows/release.yaml
vendored
|
|
@ -85,18 +85,6 @@ jobs:
|
||||||
path: /opt/builds/ytdl-sub_linux
|
path: /opt/builds/ytdl-sub_linux
|
||||||
key: ${{ github.sha }}-linux
|
key: ${{ github.sha }}-linux
|
||||||
|
|
||||||
- name: Save wheel to cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: /opt/wheels/ytdl-sub-${{ needs.version.outputs.pypi_version }}-py3-none-any.whl
|
|
||||||
key: ${{ github.sha }}-wheel
|
|
||||||
|
|
||||||
- name: Save targz to cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: /opt/wheels/ytdl-sub-${{ needs.version.outputs.pypi_version }}.tar.gz
|
|
||||||
key: ${{ github.sha }}-targz
|
|
||||||
|
|
||||||
build-arm:
|
build-arm:
|
||||||
name: build-arm
|
name: build-arm
|
||||||
needs:
|
needs:
|
||||||
|
|
@ -194,31 +182,26 @@ jobs:
|
||||||
pypi-publish:
|
pypi-publish:
|
||||||
name: pypi-publish
|
name: pypi-publish
|
||||||
needs:
|
needs:
|
||||||
- build-linux
|
- version
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python 3.10
|
- uses: actions/setup-python@v4
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: '3.10'
|
||||||
|
- name: Write version to init file
|
||||||
- name: Restore wheel
|
run: |
|
||||||
uses: actions/cache@v3
|
echo '${{ needs.version.outputs.init_contents }}' > src/ytdl_sub/__init__.py
|
||||||
with:
|
- name: Build wheel
|
||||||
path: /opt/wheels/ytdl-sub-${{ needs.version.outputs.pypi_version }}-py3-none-any.whl
|
run: |
|
||||||
key: ${{ github.sha }}-wheel
|
# Build wheel
|
||||||
|
pip install -e .
|
||||||
- name: Restore targz
|
pip install build
|
||||||
uses: actions/cache@v3
|
python3 -m build
|
||||||
with:
|
|
||||||
path: /opt/wheels/ytdl-sub-${{ needs.version.outputs.pypi_version }}.tar.gz
|
|
||||||
key: ${{ github.sha }}-targz
|
|
||||||
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
packages_dir: /opt/wheels
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue