Skip to content

Commit f447f6c

Browse files
authored
Merge pull request #4 from huntdatacenter/diepirio-patch-3
Diepirio patch 3
2 parents e0aa784 + 59d9708 commit f447f6c

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: Publish package
12
# This workflow will upload a Python Package using Twine when a release is created
23
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
34

@@ -12,28 +13,35 @@ on:
1213
release:
1314
types: [published]
1415

15-
permissions:
16-
contents: read
17-
1816
jobs:
19-
deploy:
20-
17+
build:
2118
runs-on: ubuntu-latest
22-
2319
steps:
24-
- uses: actions/checkout@v3
25-
- name: Set up Python
26-
uses: actions/setup-python@v3
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
with:
23+
ref: ${{ github.event.release.tag_name }}
24+
- name: Install Python
25+
uses: actions/setup-python@v4
2726
with:
28-
python-version: '3.x'
29-
- name: Install dependencies
27+
python-version: '3.10'
28+
# architecture: 'x64'
29+
30+
- name: Setup pip cache
31+
uses: actions/cache@v3
32+
with:
33+
path: ~/.cache/pip
34+
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('pyproject.toml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pip-3.10-
37+
- name: Build extension package
3038
run: |
31-
python -m pip install --upgrade pip
32-
pip install build
33-
- name: Build package
34-
run: python -m build
35-
- name: Publish package
36-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
39+
python3 -m pip install hatch
40+
41+
hatch build
42+
- name: Publish extension package
43+
# if: startsWith(github.ref, 'refs/tags')
44+
uses: pypa/gh-action-pypi-publish@release/v1
3745
with:
3846
user: __token__
3947
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)