You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 'v*'# Push events to matching v*, i.e. v1.0, v20.15.10
7
+
- "v*"# Push events to matching v*, i.e. v1.0, v20.15.10
8
+
workflow_dispatch:
9
+
inputs:
10
+
version:
11
+
description: Manual Release
12
+
default: test
13
+
required: false
14
+
9
15
10
16
jobs:
11
17
build:
18
+
name: Create release & publish to PyPI
12
19
runs-on: ubuntu-latest
13
20
steps:
14
-
- uses: actions/checkout@v2
15
-
- name: Set up Python
16
-
uses: actions/setup-python@v2
17
-
with:
18
-
python-version: '3.x'
19
-
- name: Install dependencies
20
-
run: |
21
-
python -m pip install --upgrade pip
22
-
python -m pip install --upgrade build twine
23
-
python -m build
24
-
twine check --strict dist/*
25
-
- name: Publish distribution 📦 to PyPI
26
-
uses: pypa/gh-action-pypi-publish@release/v1
27
-
with:
28
-
password: ${{ secrets.pypi_password }}
29
-
- name: Create Release
30
-
id: create_release
31
-
uses: actions/create-release@v1
32
-
env:
33
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
34
-
with:
35
-
tag_name: ${{ github.ref }}
36
-
release_name: Version ${{ github.ref }}
37
-
draft: false
38
-
prerelease: false
39
-
- name: Get Asset name
40
-
run: |
41
-
export PKG=$(ls dist/)
42
-
set -- $PKG
43
-
echo "name=$1" >> $GITHUB_ENV
44
-
- name: Upload Release Asset
45
-
id: upload-release-asset
46
-
uses: actions/upload-release-asset@v1
47
-
env:
48
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
-
with:
50
-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
0 commit comments