Skip to content

Commit 5fd5246

Browse files
Merge pull request #10 from robbievanleeuwen/releases/v0.2.0
Bump version to v0.2.0
2 parents 972de27 + fabc8e9 commit 5fd5246

File tree

4 files changed

+138
-2
lines changed

4 files changed

+138
-2
lines changed

.github/release-drafter.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
categories:
2+
- title: ":boom: Breaking Changes"
3+
label: "breaking"
4+
5+
- title: ":rocket: Features"
6+
label: "enhancement"
7+
8+
- title: ":fire: Removals and Deprecations"
9+
label: "removal"
10+
11+
- title: ":bug: Fixes"
12+
label: "bug"
13+
14+
- title: ":racehorse: Performance"
15+
label: "performance"
16+
17+
- title: ":rotating_light: Testing"
18+
label: "testing"
19+
20+
- title: ":construction_worker: Continuous Integration"
21+
label: "ci"
22+
23+
- title: ":books: Documentation"
24+
label: "documentation"
25+
26+
- title: ":hammer: Refactoring"
27+
label: "refactoring"
28+
29+
- title: ":lipstick: Style"
30+
label: "style"
31+
32+
- title: ":package: Dependencies"
33+
labels:
34+
- "dependencies"
35+
- "build"
36+
37+
category-template: "### $TITLE"
38+
name-template: "v$RESOLVED_VERSION"
39+
tag-template: "v$RESOLVED_VERSION"
40+
41+
version-resolver:
42+
major:
43+
labels:
44+
- "major"
45+
minor:
46+
labels:
47+
- "minor"
48+
patch:
49+
labels:
50+
- "patch"
51+
default: patch
52+
53+
# Custom text at start of release
54+
header: >
55+
56+
Initial release.
57+
58+
template: |
59+
60+
## What's Changed
61+
62+
$CHANGES
63+
64+
footer: |
65+
66+
**Full changelog:** [$PREVIOUS_TAG...v$RESOLVED_VERSION](https://github.com/robbievanleeuwen/upgrade-dependencies/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)

.github/workflows/release.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
UV_VERSION: 0.5.4
10+
DEFAULT_PYTHON_VERSION: '3.13'
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write
18+
contents: write
19+
20+
steps:
21+
- name: Check out the repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 2
25+
26+
- name: Install uv version ${{ env.UV_VERSION }}
27+
uses: astral-sh/setup-uv@v3
28+
with:
29+
version: ${{ env.UV_VERSION }}
30+
31+
- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
32+
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
33+
34+
- name: Get previous commit SHA
35+
run: echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_ENV
36+
37+
- name: Detect and tag new version
38+
id: check-version
39+
if: ${{ env.sha }}
40+
uses: salsify/action-detect-and-tag-new-version@v2
41+
with:
42+
version-command: echo $(grep "^version =" pyproject.toml | sed 's/version
43+
= "\(.*\)"/\1/')
44+
45+
- name: Bump version for dev release
46+
if: '! steps.check-version.outputs.tag'
47+
run: |
48+
VERSION=$(grep "^version =" pyproject.toml | sed 's/version = "\(.*\)"/\1/')
49+
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version $VERSION.dev.$(date +%s)
50+
51+
- name: Build package
52+
run: uv build
53+
54+
- name: Publish package on PyPI
55+
if: steps.check-version.outputs.tag
56+
uses: pypa/gh-action-pypi-publish@release/v1
57+
58+
- name: Publish package on TestPyPI
59+
if: '! steps.check-version.outputs.tag'
60+
uses: pypa/gh-action-pypi-publish@release/v1
61+
with:
62+
repository-url: https://test.pypi.org/legacy/
63+
64+
- name: Publish the release notes
65+
uses: release-drafter/release-drafter@v6
66+
with:
67+
publish: ${{ steps.check-version.outputs.tag != '' }}
68+
tag: ${{ steps.check-version.outputs.tag }}
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "upgrade-dependencies"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "Creates PRs for dependency updates in python projects"
55
readme = "README.md"
66
license = {file = "LICENSE"}

uv.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)