Skip to content

Bump version to v0.2.0 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
categories:
- title: ":boom: Breaking Changes"
label: "breaking"

- title: ":rocket: Features"
label: "enhancement"

- title: ":fire: Removals and Deprecations"
label: "removal"

- title: ":bug: Fixes"
label: "bug"

- title: ":racehorse: Performance"
label: "performance"

- title: ":rotating_light: Testing"
label: "testing"

- title: ":construction_worker: Continuous Integration"
label: "ci"

- title: ":books: Documentation"
label: "documentation"

- title: ":hammer: Refactoring"
label: "refactoring"

- title: ":lipstick: Style"
label: "style"

- title: ":package: Dependencies"
labels:
- "dependencies"
- "build"

category-template: "### $TITLE"
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"

version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch

# Custom text at start of release
header: >

Initial release.

template: |

## What's Changed

$CHANGES

footer: |

**Full changelog:** [$PREVIOUS_TAG...v$RESOLVED_VERSION](https://github.com/robbievanleeuwen/upgrade-dependencies/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
push:
branches:
- master

env:
UV_VERSION: 0.5.4
DEFAULT_PYTHON_VERSION: '3.13'

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write

steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}

- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}

- name: Get previous commit SHA
run: echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_ENV

- name: Detect and tag new version
id: check-version
if: ${{ env.sha }}
uses: salsify/action-detect-and-tag-new-version@v2
with:
version-command: echo $(grep "^version =" pyproject.toml | sed 's/version
= "\(.*\)"/\1/')

- name: Bump version for dev release
if: '! steps.check-version.outputs.tag'
run: |
VERSION=$(grep "^version =" pyproject.toml | sed 's/version = "\(.*\)"/\1/')
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version $VERSION.dev.$(date +%s)

- name: Build package
run: uv build

- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/gh-action-pypi-publish@release/v1

- name: Publish package on TestPyPI
if: '! steps.check-version.outputs.tag'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish the release notes
uses: release-drafter/release-drafter@v6
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "upgrade-dependencies"
version = "0.1.0"
version = "0.2.0"
description = "Creates PRs for dependency updates in python projects"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.