Skip to content

Commit 763d9eb

Browse files
committed
fix: update automatic release
1 parent 63f5d69 commit 763d9eb

File tree

1 file changed

+45
-50
lines changed

1 file changed

+45
-50
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,45 @@
1-
# name: Release and PyPI Upload
2-
3-
# on:
4-
# push:
5-
# tags:
6-
# - '*'
7-
8-
# jobs:
9-
# release:
10-
# runs-on: ubuntu-latest
11-
12-
# steps:
13-
# - name: Checkout code
14-
# uses: actions/checkout@v2
15-
16-
# - name: Setup Node.js
17-
# uses: actions/setup-node@v4
18-
# with:
19-
# node-version: 20
20-
21-
# - name: Semantic Release
22-
# env:
23-
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
24-
# run: npx semantic-release
25-
26-
# upload-to-pypi:
27-
# needs: release
28-
# runs-on: ubuntu-latest
29-
30-
# steps:
31-
# - name: Checkout code
32-
# uses: actions/checkout@v2
33-
34-
# - name: Setup Python
35-
# uses: actions/setup-python@v2
36-
# with:
37-
# python-version: 3.8
38-
39-
# - name: Install dependencies
40-
# run: |
41-
# python -m pip install --upgrade pip
42-
# python -m pip install twine
43-
44-
# - name: Build and upload to PyPI
45-
# run: |
46-
# python setup.py sdist
47-
# twine upload dist/*
48-
# env:
49-
# TWINE_USERNAME: __token__
50-
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
1+
name: Release and PyPI Upload
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
concurrency: release
12+
permissions:
13+
id-token: write
14+
contents: write
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Python Semantic Release
22+
uses: python-semantic-release/python-semantic-release@master
23+
with:
24+
github_token: ${{ secrets.GH_TOKEN }}
25+
26+
upload-to-pypi:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v3
31+
- name: Set up Python
32+
uses: actions/setup-python@v3
33+
with:
34+
python-version: '3.x'
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install build
39+
- name: Build package
40+
run: python -m build
41+
- name: Publish package
42+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
43+
with:
44+
user: __token__
45+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)