-
Notifications
You must be signed in to change notification settings - Fork 84
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
1 parent
e97d572
commit b581450
Showing
3 changed files
with
98 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Shared Build Workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
pypi_token: | ||
required: true | ||
type: secret | ||
|
||
jobs: | ||
build-wheel: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 (64-bit) | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
architecture: 'x64' | ||
- name: Install build dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build | ||
- name: Build Python wheel | ||
run: python -m build --outdir dist/ | ||
- name: Upload Python wheel to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ inputs.pypi_token }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
build-binaries: | ||
needs: build-wheel | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: windows-2019 | ||
arch: x86 | ||
- os: windows-2019 | ||
arch: x64 | ||
- os: macos-latest | ||
arch: x64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
architecture: ${{ matrix.arch }} | ||
- name: Install PyInstaller | ||
run: pip install pyinstaller | ||
|
||
- name: Build with PyInstaller | ||
run: pyinstaller --noconfirm --clean tdmgr.spec | ||
|
||
- name: Upload binaries artifact to workflow | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/* |
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,36 @@ | ||
name: Develop Branch Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- cicd_update | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
secrets: read | ||
|
||
jobs: | ||
call-shared-workflow: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
pypi_token: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
|
||
upload-assets: | ||
needs: call-shared-workflow | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install SSH key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.ASSETS_PRIVATE_KEY }} | ||
|
||
- name: Download artifacts from build | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: dist | ||
|
||
- name: Upload assets via SCP | ||
run: | | ||
scp -P ${{ secrets.ASSETS_PORT }} -o StrictHostKeyChecking=no -r dist/* ${{ secrets.ASSETS_USER }}@${{ secrets.ASSETS_HOST }}:/tdmgr/ | ||
shell: bash |
File renamed without changes.