Skip to content

Commit 6dfe8f7

Browse files
ci: added release and validate workflows
1 parent b711de7 commit 6dfe8f7

4 files changed

Lines changed: 70 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Step 1: Checkout the repository
15+
- name: Checkout Code
16+
uses: actions/checkout@v3
17+
18+
# Step 2: Set up Node.js
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 21
23+
cache: "npm"
24+
25+
# Step 3: Install dependencies
26+
- name: Install Dependencies
27+
run: npm ci
28+
29+
# Step 4: Run semantic-release
30+
- name: Run Semantic Release
31+
env:
32+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
33+
run: npx semantic-release --assets "./docs/**/*"

.github/workflows/validate.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Validate
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- release
8+
9+
jobs:
10+
format:
11+
name: Format Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# Step 1: Checkout the repository
16+
- name: Checkout Code
17+
uses: actions/checkout@v3
18+
19+
# Step 2: Set up Python
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: 3.12
24+
25+
# Step 3: Install dependencies
26+
- name: Install dependencies
27+
run: |
28+
pip install pipenv
29+
pipenv install --dev
30+
31+
# Step 4: Run ruff check
32+
- name: Run ruff check
33+
run: pipenv run ruff check .

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ name = "pypi"
77
ruff = "*"
88
pyandoc = "*"
99
odfpy = "*"
10-
pywin32 = "*"
1110
pandoc = "*"
11+
pywin32 = { version = "*", markers = "sys_platform == 'win32'" }
1212

1313
[dev-packages]
1414
ruff = "*"
1515

1616
[requires]
17-
python_version = "3.12"
17+
python_version = "3.12"

release.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export default {
22
branches: ["release"],
33
plugins: [
4+
"@semantic-release/github",
5+
"@semantic-release/changelog",
46
[
57
"@semantic-release/commit-analyzer",
68
{
@@ -47,8 +49,6 @@ export default {
4749
npmPublish: false,
4850
},
4951
],
50-
"@semantic-release/github",
51-
"@semantic-release/changelog",
5252
[
5353
"@semantic-release/git",
5454
{

0 commit comments

Comments
 (0)