Skip to content

Commit 6858e92

Browse files
committed
Update CI
1 parent 1b90eb1 commit 6858e92

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, develop]
66
tags: ["*"]
77
pull_request:
88
workflow_dispatch:

.github/workflows/deploy.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Tests"]
6+
branches: [main]
7+
types:
8+
- completed
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
id-token: write
15+
16+
# require tests to succeed, and 'ci: deploy' in commit message
17+
if: "${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_commit.message, 'ci: deploy') }}"
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.12'
24+
cache: 'pip'
25+
cache-dependency-path: pyproject.toml
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip build setuptools wheel cibuildwheel==2.14.0
29+
pip install -e .
30+
- name: Get version
31+
id: version
32+
# outputs project, version, and tag
33+
run: python .github/scripts/get_versioninfo.py
34+
- name: Build wheels
35+
run: python -m build
36+
#- name: Upload wheels
37+
# uses: actions/upload-artifact@v3
38+
# with:
39+
# path: dist/*
40+
- name: Create tag & release
41+
uses: ncipollo/release-action@v1
42+
with:
43+
tag: '${{ steps.version.outputs.tag }}'
44+
commit: '${{ github.event.head_commit.id }}'
45+
body: '${{ steps.version.outputs.project }} version ${{ steps.version.outputs.version }}'
46+
name: 'Version ${{ steps.version.outputs.version }}'
47+
artifacts: 'dist/*'
48+
- name: Deploy to PyPi
49+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)