-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
13,218 additions
and
3,176 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
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,84 @@ | ||
name: Deploy Tools | ||
|
||
on: | ||
|
||
workflow_dispatch: | ||
|
||
inputs: | ||
|
||
version: | ||
description: 'pilotlight_tools version' | ||
required: true | ||
default: '0.11.0' | ||
|
||
deploy: | ||
description: 'Deploy (true will deploy to pypi)' | ||
required: true | ||
default: 'false' | ||
|
||
deploytest: | ||
description: 'Deploy (true will deploy to test pypi)' | ||
required: true | ||
default: 'false' | ||
|
||
jobs: | ||
|
||
build-package: | ||
|
||
runs-on: windows-2019 | ||
strategy: | ||
matrix: | ||
python-version: [ 3.9 ] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel build | ||
- name: Build package | ||
shell: cmd | ||
run: | | ||
cd %GITHUB_WORKSPACE% | ||
echo ${{ github.event.inputs.version }} > version_number.txt | ||
ren build pilotlight_build | ||
cd pilotlight_build | ||
cd .. | ||
move pilotlight_build\deploy_setup.py deploy_setup.py | ||
del setup.py | ||
move deploy_setup.py setup.py | ||
echo [build-system] >> pyproject.toml | ||
echo requires = ["setuptools", "wheel"] >> pyproject.toml | ||
echo build-backend = "setuptools.build_meta" >> pyproject.toml | ||
python -m build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: pltools wheel | ||
path: | | ||
${{ github.workspace }}/version_number.txt | ||
${{ github.workspace }}/dist/*.whl | ||
${{ github.workspace }}/dist/*.tar.gz | ||
retention-days: 1 | ||
if-no-files-found: error | ||
|
||
- name: PyPi Deployment | ||
shell: cmd | ||
if: ${{contains(github.event.inputs.deploy, 'true') && github.ref == 'refs/heads/master'}} | ||
run: | | ||
python -m pip install twine | ||
python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing | ||
- name: Test PyPi Deployment | ||
shell: cmd | ||
if: ${{contains(github.event.inputs.deploytest, 'true') && github.ref == 'refs/heads/master'}} | ||
run: | | ||
python -m pip install twine | ||
python -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --skip-existing |
Oops, something went wrong.