Update build process to include tar.gz and whl file names #6
Workflow file for this run
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
name: On Push Tags | ||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
jobs: | ||
test: | ||
uses: ./.github/workflows/pytest-workflow-call.yaml | ||
static-type-check: | ||
uses: ./.github/workflows/static-type-check-workflow-call.yaml | ||
Check failure on line 12 in .github/workflows/on_push_tags.yaml
|
||
code-style-check: | ||
uses: ./.github/workflows/code-style-check-workflow-call.yaml | ||
validate-version: | ||
uses: ./.github/workflows/validate-version-workflow-call.yaml | ||
deploy: | ||
needs: [test, static-type-check, code-style-check, validate-version] | ||
runs-on: windows-latest | ||
env: | ||
PRIVATE_REPO_USER: "hmasdev" | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[dev] | ||
- name: Build | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
$TARGZNAME = (Get-ChildItem -Name .\dist\*.tar.gz) | ||
$WHLNAME = (Get-ChildItem -Name .\dist\*.whl) | ||
echo "TARGZNAME=$TARGZNAME" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
echo "WHLNAME=$WHLNAME" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
- name: Release | ||
id: release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Publish tar.gz | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: dist\${{ TARGZNAME }} | ||
Check failure on line 63 in .github/workflows/on_push_tags.yaml
|
||
asset_name: ${{ TARGZNAME }} | ||
asset_content_type: application/gzip | ||
- name: Publish .whl | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: dist\${{ WHLNAME }} | ||
asset_name: ${{ WHLNAME }} | ||
asset_content_type: application/zip |