Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b091015

Browse files
Update release.yml
Update release.yml according to pypi docs. You can find the documentation [here](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/) Change token for test pypi and change name to all upper case Add workflow_dispatch to mannually trigger action add on tags to action change syntax for pushing tags
1 parent e4863fe commit b091015

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

‎.github/workflows/release.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,48 @@ name: Push to PyPi
22

33
on:
44
push:
5-
branches:
6-
- master
5+
tags:
6+
- "v*"
7+
branches: [master]
8+
workflow_dispatch:
79

810
jobs:
9-
test:
11+
build-n-publish:
1012
runs-on: "ubuntu-latest"
1113

1214
steps:
1315
- name: Checkout source
14-
uses: actions/checkout@v2
16+
uses: actions/checkout@master
1517

16-
- name: Set up Python 3.8
17-
uses: actions/setup-python@v1
18+
- name: Set up Python 3.9
19+
uses: actions/setup-python@v2
1820
with:
19-
python-version: 3.8
21+
python-version: 3.9
2022

21-
- name: Install build dependencies
22-
run: python -m pip install build wheel
23+
- name: Install pypa/build
24+
run: >-
25+
python -m
26+
pip install
27+
build
28+
--user
29+
- name: Build a binary wheel and a source tarball
30+
run: >-
31+
python -m
32+
build
33+
--sdist
34+
--wheel
35+
--outdir dist/
36+
.
2337
24-
- name: Build distributions
25-
shell: bash -l {0}
26-
run: python setup.py sdist bdist_wheel
38+
- name: Publish distribution 📦 to Test PyPI
39+
uses: pypa/gh-action-pypi-publish@master
40+
with:
41+
skip_existing: true
42+
password: ${{ secrets.TEST_PYPI_TOKEN }}
43+
repository_url: https://test.pypi.org/legacy/
2744

28-
- name: Publish package to PyPI
29-
if: github.repository == 'automl/Auto-PyTorch' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
45+
- name: Publish distribution 📦 to PyPI
46+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
3047
uses: pypa/gh-action-pypi-publish@master
3148
with:
32-
user: __token__
33-
password: ${{ secrets.pypi_token }}
49+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /