Skip to content

Commit c5d700b

Browse files
committed
ci: release
1 parent 67b08fa commit c5d700b

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Releases
2+
3+
on:
4+
push:
5+
tags:
6+
- "feature_artifacts-helper_*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
run:
13+
working-directory: src/artifacts-helper/codespaces_artifacts_helper_keyring
14+
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: wntrblm/nox@main
22+
with:
23+
python-versions: "3.11, 3.12"
24+
25+
- name: Setup PDM
26+
uses: pdm-project/setup-pdm@v4
27+
with:
28+
version: "2.15.1"
29+
python-version-file: "src/artifacts-helper/codespaces_artifacts_helper_keyring/pyproject.toml"
30+
31+
- name: Run nox release
32+
run: pdm release
33+
34+
- name: Upload build artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: codespaces_artifacts_helper_keyring
38+
path: |
39+
src/artifacts-helper/codespaces_artifacts_helper_keyring/dist
40+
41+
- uses: ncipollo/release-action@v1
42+
with:
43+
artifacts: "src/artifacts-helper/codespaces_artifacts_helper_keyring/dist/codespaces_artifacts_helper_keyring-*"
44+
artifactErrorsFailBuild: true
45+
body: |
46+
Release notes go here

src/artifacts-helper/codespaces_artifacts_helper_keyring/noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,12 @@ def mypy(session):
6161
session.run_always("pdm", "install", external=True)
6262
args = session.posargs or LOCATIONS
6363
session.run("mypy", *args)
64+
65+
@nox.session(py=DEFAULT_PYTHON_VERSION)
66+
def release(session):
67+
"""Build the package only.
68+
69+
Usually, this would also call `twine` to upload the package to PyPI, but we
70+
only publish to GitHub Releases in this project. See the `release` workflow."""
71+
session.run_always("pdm", "install", external=True)
72+
session.run("pdm", "build", external=True)

0 commit comments

Comments
 (0)