Skip to content

Update setup.py

Update setup.py #1

Workflow file for this run

# This pipeline is designed to create a wheel and publich the wheel on
# GitHub
# Execute pipeline only on a new tag, if the tag
# if named "v*" (e.g. v1.0)
on:
push:
tags:
- 'v*'
# Pipeline name
name: Create new release
# Run pipeline
jobs:
build:
name: Build package
uses: ./.github/workflows/python-app.yml
deploy:
name: Deploy package
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m pip install build
- name: Compute release version
run: |
TAG=${{ github.ref }}
echo "VERSION=${TAG#refs/tags/v}" >> $GITHUB_ENV
echo "The release version if ${TAG#refs/tags/v}"
- name: Create wheel
env:
TAG_NAME: ${{ env.VERSION }}
run: python -m build
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
draft: false
prerelease: false
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/FinancialApplications-${{ env.VERSION }}-py3-none-any.whl
asset_name: FinancialApplications-${{ env.VERSION }}-py3-none-any.whl
asset_content_type: application/x-wheel+zip