Skip to content

new version number

new version number #3

Workflow file for this run

name: Upload Python Package and Create Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set tag name
id: tag_name
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create Release
id: create_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: Upload Release Asset - Wheel File
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/gpuwidget-${{ steps.tag_name.outputs.version }}-py3-none-any.whl
asset_name: gpuwidget-${{ steps.tag_name.outputs.version }}-py3-none-any.whl
asset_content_type: application/zip
- name: Upload Release Asset - Tar.gz File
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/gpuwidget-${{ steps.tag_name.outputs.version }}.tar.gz
asset_name: gpuwidget-${{ steps.tag_name.outputs.version }}.tar.gz
asset_content_type: application/gzip