Skip to content

Commit d9ed73f

Browse files
authored
Merge pull request #2 from huntdatacenter/pgweb-proxy
added workflow dev and publish
2 parents 3973c86 + 7d4a895 commit d9ed73f

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Testing package
2+
3+
on:
4+
push:
5+
branches: '*'
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:s
16+
ref: ${{ github.event.release.tag_name }}
17+
- name: Install Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
# architecture: 'x64'
22+
23+
- name: Setup pip cache
24+
uses: actions/cache@v3
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('package.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-pip-3.10-
30+
- name: Build extension package
31+
run: |
32+
python3 -m pip install hatch
33+
34+
hatch build

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:s
14+
ref: ${{ github.event.release.tag_name }}
15+
- name: Install Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
19+
# architecture: 'x64'
20+
21+
- name: Setup pip cache
22+
uses: actions/cache@v3
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('package.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-3.10-
28+
- name: Build extension package
29+
run: |
30+
python3 -m pip install hatch
31+
32+
hatch build
33+
- name: Publish extension package
34+
# if: startsWith(github.ref, 'refs/tags')
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)