-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.38 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Main Workflow
on:
push:
branches:
- main
jobs:
common:
name: Pre-commit and Test CI
runs-on: ubuntu-latest
needs: [pre-commit, test]
uses: ./.github/workflows/common.yaml
bump-version:
name: Bump Version
needs: common
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: |
pdm install -G :all
- name: Install bump
run: |
pdm self add pdm-bump
- name: Bump Version
run: |
pdm bump auto
- name: Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git push origin main --tags
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest
needs: bump-version
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: |
pdm install -G :all
- name: Build
run: |
pdm build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: dist/*.whl