build unix all
This commit is contained in:
parent
e5bd9944ac
commit
3f5589b11d
2 changed files with 64 additions and 29 deletions
92
.github/workflows/release.yaml
vendored
92
.github/workflows/release.yaml
vendored
|
|
@ -5,35 +5,7 @@ on:
|
|||
branches:
|
||||
- master
|
||||
jobs:
|
||||
pypi-publish:
|
||||
name: pypi-publish
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ "3.10" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Needed for correct commit count. TODO: define once using GH actions
|
||||
ref: master
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Build Wheel
|
||||
run: |
|
||||
make wheel
|
||||
|
||||
- name: Publish distribution 📦 to PyPI
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
github-release:
|
||||
get-version:
|
||||
name: github-release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
@ -67,6 +39,68 @@ jobs:
|
|||
echo "${{ env.PYPI_VERSION }}"
|
||||
echo "${{ env.LOCAL_VERSION }}"
|
||||
|
||||
pypi-publish:
|
||||
name: pypi-publish
|
||||
needs:
|
||||
- get-version
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ "3.10" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Needed for correct commit count. TODO: define once using GH actions
|
||||
ref: master
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Build Wheel
|
||||
run: |
|
||||
make wheel
|
||||
|
||||
- name: Publish distribution 📦 to PyPI
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
build-unix:
|
||||
name: build-unix
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install and Package
|
||||
run: |
|
||||
sudo apt-get -y install zip
|
||||
pip install -e .[build]
|
||||
EXEC_SUFFIX=_linux make executable
|
||||
zip dist/ytdl-sub_linux.zip dist/ytdl-sub_linux
|
||||
tar czf dist/ytdl-sub_linux.tar.gz dist/ytdl-sub_linux
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: |
|
||||
dist/ytdl-sub_linux
|
||||
dist/ytdl-sub_linux.zip
|
||||
dist/ytdl-sub_linux.tar.gz
|
||||
|
||||
github-release:
|
||||
name: github-release
|
||||
needs:
|
||||
- get-version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
id: create_release
|
||||
|
|
|
|||
1
Makefile
1
Makefile
|
|
@ -35,6 +35,7 @@ docker: docker_stage
|
|||
sudo docker build --no-cache -t ytdl-sub:local docker/
|
||||
executable: clean
|
||||
pyinstaller ytdl-sub.spec
|
||||
mv dist/ytdl-sub dist/ytdl-sub${EXEC_SUFFIX}
|
||||
docs:
|
||||
sphinx-build -a -b html docs docs/_html
|
||||
clean:
|
||||
|
|
|
|||
Loading…
Reference in a new issue