Skip to content

Commit 238b2c0

Browse files
committed
chore: split workflow
1 parent dfba013 commit 238b2c0

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,11 @@ env:
1414
packages/bolt
1515
1616
jobs:
17-
main:
18-
concurrency:
19-
group: ${{ github.workflow }}-${{ github.ref_name }}
20-
cancel-in-progress: false
21-
environment:
22-
name: pypi
23-
permissions:
24-
id-token: write
25-
contents: write
17+
check:
2618
runs-on: ubuntu-latest
2719
steps:
2820
- name: Checkout code
2921
uses: actions/checkout@v5
30-
with:
31-
ref: ${{ github.ref_name }}
32-
fetch-depth: 0
33-
- name: Reset workflow sha
34-
run: git reset --hard ${{ github.sha }}
3522
- name: Set up Python
3623
uses: actions/setup-python@v6
3724
- name: Set up uv
@@ -53,8 +40,34 @@ jobs:
5340
run: uv run ruff check
5441
- name: Ruff format
5542
run: uv run ruff format --check --diff
43+
44+
release:
45+
if: github.event_name == 'push' && github.repository == 'mcbeet/beet'
46+
needs: check
47+
concurrency:
48+
group: ${{ github.workflow }}-release-${{ github.ref_name }}
49+
cancel-in-progress: false
50+
environment:
51+
name: pypi
52+
permissions:
53+
id-token: write
54+
contents: write
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v5
59+
with:
60+
ref: ${{ github.ref_name }}
61+
fetch-depth: 0
62+
- name: Reset workflow sha
63+
run: git reset --hard ${{ github.sha }}
64+
- name: Set up Python
65+
uses: actions/setup-python@v6
66+
- name: Set up uv
67+
uses: astral-sh/setup-uv@v7
68+
- name: Install dependencies
69+
run: uv sync --all-packages --locked --all-extras --dev
5670
- name: Release
57-
if: github.event_name == 'push' && github.repository == 'mcbeet/beet'
5871
env:
5972
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6073
run: |

0 commit comments

Comments
 (0)