Skip to content

Commit

Permalink
Merge pull request #718 from staticdev/ci/release-workflow-with-tag
Browse files Browse the repository at this point in the history
Return release workflow with tag
  • Loading branch information
staticdev authored Jan 18, 2025
2 parents 47ef9ab + e0357d2 commit 784f1f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:
inputs:
tags:
description: Release Tag
required: true
type: string

jobs:
release:
Expand Down Expand Up @@ -33,24 +36,6 @@ jobs:
pip install --constraint=.github/workflows/hatch-constraints.txt hatch
hatch --version
- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/action-detect-and-tag-new-version@v2
with:
version-command: |
bash -o pipefail -c "hatch version"
- name: Bump version for developmental release
if: "! steps.check-version.outputs.tag"
run: |
hatch version b
- name: Install UV
uses: astral-sh/setup-uv@v5

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ requires-python = ">=3.9"
dependencies = []

[tool.hatch.version]
path = "src/human_readable/__about__.py"
source = "vcs"

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"

[dependency-groups]
dev = [
Expand Down Expand Up @@ -72,5 +75,5 @@ module = ["pytest_mock"]
ignore_missing_imports = true

[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
1 change: 0 additions & 1 deletion src/human_readable/__about__.py

This file was deleted.

0 comments on commit 784f1f1

Please sign in to comment.