Skip to content

Commit 784f1f1

Browse files
authored
Merge pull request #718 from staticdev/ci/release-workflow-with-tag
Return release workflow with tag
2 parents 47ef9ab + e0357d2 commit 784f1f1

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_dispatch:
5+
inputs:
6+
tags:
7+
description: Release Tag
8+
required: true
9+
type: string
710

811
jobs:
912
release:
@@ -33,24 +36,6 @@ jobs:
3336
pip install --constraint=.github/workflows/hatch-constraints.txt hatch
3437
hatch --version
3538
36-
- name: Check if there is a parent commit
37-
id: check-parent-commit
38-
run: |
39-
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
40-
41-
- name: Detect and tag new version
42-
id: check-version
43-
if: steps.check-parent-commit.outputs.sha
44-
uses: salsify/action-detect-and-tag-new-version@v2
45-
with:
46-
version-command: |
47-
bash -o pipefail -c "hatch version"
48-
49-
- name: Bump version for developmental release
50-
if: "! steps.check-version.outputs.tag"
51-
run: |
52-
hatch version b
53-
5439
- name: Install UV
5540
uses: astral-sh/setup-uv@v5
5641

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ requires-python = ">=3.9"
1919
dependencies = []
2020

2121
[tool.hatch.version]
22-
path = "src/human_readable/__about__.py"
22+
source = "vcs"
23+
24+
[tool.hatch.version.raw-options]
25+
local_scheme = "no-local-version"
2326

2427
[dependency-groups]
2528
dev = [
@@ -72,5 +75,5 @@ module = ["pytest_mock"]
7275
ignore_missing_imports = true
7376

7477
[build-system]
75-
requires = ["hatchling"]
78+
requires = ["hatchling", "hatch-vcs"]
7679
build-backend = "hatchling.build"

src/human_readable/__about__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)