build unix all

This commit is contained in:
Jesse Bannon 2023-02-21 22:50:47 -08:00
parent e5bd9944ac
commit 3f5589b11d
2 changed files with 64 additions and 29 deletions

View file

@ -5,35 +5,7 @@ on:
branches: branches:
- master - master
jobs: jobs:
pypi-publish: get-version:
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:
name: github-release name: github-release
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -67,6 +39,68 @@ jobs:
echo "${{ env.PYPI_VERSION }}" echo "${{ env.PYPI_VERSION }}"
echo "${{ env.LOCAL_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 - name: Create Release
if: ${{ github.ref == 'refs/heads/master' }} if: ${{ github.ref == 'refs/heads/master' }}
id: create_release id: create_release

View file

@ -35,6 +35,7 @@ docker: docker_stage
sudo docker build --no-cache -t ytdl-sub:local docker/ sudo docker build --no-cache -t ytdl-sub:local docker/
executable: clean executable: clean
pyinstaller ytdl-sub.spec pyinstaller ytdl-sub.spec
mv dist/ytdl-sub dist/ytdl-sub${EXEC_SUFFIX}
docs: docs:
sphinx-build -a -b html docs docs/_html sphinx-build -a -b html docs docs/_html
clean: clean: