-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.38 KB
/
manual-republishing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build & Upload Python Package to Asset
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build-n-publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
- name: GitHub Tag Name example
run: |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
echo "Tag name from github.tag_name: ${{ github.tag_name }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -U poetry
pip install build
- name: Build package
run: python -m build
#- name: Publish package to PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create and upload release with asset to GitHub
id: upload-release-asset
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: dist/*