Skip to content

Commit 5f88218

Browse files
committed
chore(gitactions):publish.yml
1 parent a826372 commit 5f88218

File tree

2 files changed

+68
-2
lines changed

2 files changed

+68
-2
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Meow Package publishing action
1+
name: Meow Package Publish action
22

33
on:
44
push:
55
branches:
6-
- Dev
6+
- main
77

88

99
jobs:

.github/workflows/test.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Meow Package Testing action
2+
3+
on:
4+
push:
5+
branches:
6+
- Dev
7+
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: ["3.9", "3.10", "3.11", "3.12"]
16+
steps:
17+
- run: echo "Setup project.."
18+
- name: Cloning repository
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{matrix.python-version}}
24+
25+
- name: Install Hatch
26+
run: pip install hatch
27+
28+
- name: Install twin
29+
run: pip install twine
30+
31+
- name: Run tests
32+
run: hatch run test:pytest
33+
34+
- name: Build package
35+
run: hatch build
36+
37+
- name: Test package
38+
run: twine check dist/*
39+
publish:
40+
runs-on: ubuntu-latest
41+
42+
needs: test
43+
44+
permissions:
45+
id-token: write
46+
47+
steps:
48+
- run: echo "Setup project.."
49+
- name: Cloning repository
50+
uses: actions/checkout@v2
51+
- name: Setup Python
52+
uses: actions/setup-python@v2
53+
with:
54+
python-version: 3.12
55+
56+
- name: Install Hatch
57+
run: pip install hatch
58+
59+
- name: Install twin
60+
run: pip install twine
61+
62+
- name: Build package
63+
run: hatch build
64+
65+
- name: Test build using twine
66+
run: twine check dist/*

0 commit comments

Comments
 (0)