Skip to content

Commit db04e46

Browse files
author
nightjarrr
committed
Added Github release workflow.
1 parent f74d20a commit db04e46

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
18+
with:
19+
enable-cache: true
20+
21+
- name: Install Python
22+
run: uv python install
23+
24+
- name: Install project dependencies
25+
run: uv sync --all-extras --dev
26+
27+
- name: Install CLI tools
28+
run: sudo apt-get install -y --no-install-recommends rawtherapee imagemagick ffmpeg
29+
30+
- name: Run tests
31+
run: uv run pytest
32+
33+
build:
34+
needs: test # skipped entirely if test job fails
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write # required to create a GitHub Release
38+
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0 # IMPORTANT: full history so hatch-vcs can read the tag
44+
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v6
47+
with:
48+
enable-cache: true
49+
50+
- name: Install Python
51+
run: uv python install
52+
53+
- name: Build package
54+
run: uv build
55+
56+
- name: Create GitHub Release
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
files: dist/*
60+
generate_release_notes: true

0 commit comments

Comments
 (0)