Skip to content

Commit 3ee9c6d

Browse files
committed
Fix release deprecated action
1 parent 17b215f commit 3ee9c6d

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

.github/workflows/release.yml

+17-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
1+
name: Publish Python 🐍 Distribution 📦 to PyPI and TestPyPI
22

33
on:
44
push:
@@ -9,51 +9,45 @@ on:
99

1010
jobs:
1111
build:
12-
name: Build distribution 📦
12+
name: Build Distribution 📦
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
17-
- name: Set up Python
16+
- name: Checkout Code
17+
uses: actions/checkout@v4
18+
19+
- name: Set Up Python
1820
uses: actions/setup-python@v4
1921
with:
2022
python-version: "3.*"
2123

22-
- name: Install pypa/build
23-
run: pip install ".[build]"
24+
- name: Install Build Dependencies
25+
run: pip install build
2426

25-
- name: Build a binary wheel and a source tarball
27+
- name: Build Distribution Packages
2628
run: python3 -m build
2729

28-
- name: Store the distribution packages
29-
uses: actions/upload-artifact@v3
30+
- name: Upload Distribution Packages
31+
uses: actions/upload-artifact@v4
3032
with:
3133
name: python-package-distributions
3234
path: dist/
3335

3436
publish-to-pypi:
35-
name: >-
36-
Publish Python 🐍 distribution 📦 to PyPI
37-
38-
# only publish to PyPI on tag pushes
39-
if: startsWith(github.ref, 'refs/tags/')
40-
needs:
41-
- build
37+
name: Publish Distribution 📦 to PyPI
38+
if: startsWith(github.ref, 'refs/tags/') # Only publish on tag pushes
39+
needs: build
4240
runs-on: ubuntu-latest
4341

44-
environment:
45-
name: pypi
46-
url: https://pypi.org/p/brazilcep
47-
4842
permissions:
4943
id-token: write
5044

5145
steps:
52-
- name: Download all the dists
53-
uses: actions/download-artifact@v3
46+
- name: Download Distribution Packages
47+
uses: actions/download-artifact@v4
5448
with:
5549
name: python-package-distributions
5650
path: dist/
5751

58-
- name: Publish distribution 📦 to PyPI
52+
- name: Publish to PyPI
5953
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)