Skip to content
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

WIP: Changelog in repo + autorelease #6593

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
22 changes: 22 additions & 0 deletions .github/scripts/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,28 @@ def check_version_number(version_string, allow_duplicate=False):
print(results[0])
exit(0)

if 'do_release' in sys.argv:
target = os.getenv('TARGET')
highest_tupple = get_existing_release_tags()[0]

old_version = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2]}'
if target == 'master':
tag = f'{highest_tupple[0]}.{highest_tupple[1] + 1}.0'
old_branch = 'master'
elif target == 'stable':
tag = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2] + 1}'
old_branch = f'{highest_tupple[0]}.{highest_tupple[1]}.x'
else:
raise ValueError(f"Unknown target '{target}'")
new_tag = f'{tag} dev'

with open(os.getenv('GITHUB_OUTPUT'), 'a') as env_file:
env_file.write(f'old_version={old_version}\n')
env_file.write(f'old_branch={old_branch}\n')
env_file.write(f'tag={tag}\n')
env_file.write(f'new_tag={new_tag}\n')
exit(0)

# GITHUB_REF_TYPE may be either 'branch' or 'tag'
GITHUB_REF_TYPE = os.environ['GITHUB_REF_TYPE']

Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/do_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish a new release

on:
workflow_dispatch:
inputs:
target:
description: Which kind of release is this?
required: true
type: choice
default: "stable"
options:
- "master"
- "stable"

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Set up environment
run: pip install requests >/dev/null 2>&1
- name: Gather version information
id: version
env:
TARGET: ${{ github.event.inputs.target }}
run: |
python3 ci/version_check.py do_release
cat $GITHUB_OUTPUT
- name: Gather auto-text
id: auto_text
run: |
auto_text=$(curl -s -S -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.RELEASE_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \
-d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}"}')
echo $auto_text
echo $auto_text >> $GITHUB_STEP_SUMMARY
{
echo 'auto_text<<EOF'
$auto_text
EOF
} >> "$GITHUB_OUTPUT"
- name: "Dummy: Set version"
run: echo "Change version to ${{ steps.version.outputs.tag }}"
- name: "Dummy: Update changelog header"
id: changelog
run: |
echo "Update changelog to ${{ steps.version.outputs.tag }}"
echo "changelog_text=$(grep 'version' setup.py | cut -d "'" -f 2)" >> $GITHUB_OUTPUT
- name: "Dummy: Push changes"
run: echo "Push changes to ${{ github.event.inputs.target }}"
- name: "Dummy: Create release"
run: |
echo "Creating release for ${{ steps.version.outputs.tag }} on branch ${{ github.event.inputs.target }}"
echo "Branch text:
${{ steps.changelog.outputs.changelog_text }}

${{ steps.auto_text.outputs.auto_text }}"
- name: "Dummy: Bumpy version on master"
if: github.event.inputs.target == 'master'
run: echo "Bumping version on master to ${{ steps.version.outputs.new_tag }}"
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Changelog

All notable changes to this project will be documented in this file (starting with 0.15.0).

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). InvenTree is currently considered to be in a pre-1.0 state, bumps to the minor version number signify new features. The [roadmap to 1.0](https://github.com/inventree/InvenTree/milestone/17) is public.

## [Unreleased]

### Added


### Changed


### Removed

## [0.14.0] - 2024-02-29

#### General

This release focused on furthering PUI, improving the API and enhancing the developer tooling.

We added machine integration, a feature that allows the user to connect more than 1 printer of the same manufacturer and model to an instance. It also enables integration of other machines, it is planned to develop this feature further in the next releases. This feature is PUI-only. [#6486](https://github.com/inventree/InvenTree/issues/6486)

A few quality of life improvements were made to the CI, such as the addition of API schema tracking, which ensures API versions are tracked and documented. We switched to ruff for CI linting, uv for installing packages and updated to the 4.2 LTS version of Django.

PUI was developed further, with the addition of support for SSO, user registration, and greatly improved tables among many additions. Especially administrative functions are improved compared to the classical UI (CUI).

PUI is enabled by default in this release and can be accessed by navigating to `/platform/` on the instance. We appreciate feedback.

### Added

- Machine model and integration https://github.com/inventree/InvenTree/pull/4824
- Disabling plugin installation from the web interface/API (https://github.com/inventree/InvenTree/issues/6531)
- Importing part image names https://github.com/inventree/InvenTree/pull/6513
- Support for Engineering units https://github.com/inventree/InvenTree/pull/6539
- Blocking outputs if tests not successful https://github.com/inventree/InvenTree/pull/6057
- API schema tracking https://github.com/inventree/InvenTree/pull/6440
- API documentation on the doc site https://github.com/inventree/InvenTree/pull/6319
- Wider Validation plugin support https://github.com/inventree/InvenTree/pull/6410
- Support for SSO in PUI https://github.com/inventree/InvenTree/pull/6333
- Translation support for tables in PUI https://github.com/inventree/InvenTree/pull/6357
- Slovak support https://github.com/inventree/InvenTree/pull/6351
- User Registration for PUI https://github.com/inventree/InvenTree/pull/6309
- Creating user with password from file https://github.com/inventree/InvenTree/pull/6144
- OpenAPI tracing https://github.com/inventree/InvenTree/pull/6211

### Fixed

- SITE_URL missdetection (https://github.com/inventree/InvenTree/pull/6585)
- Wrong rendering of temperatures (https://github.com/inventree/InvenTree/pull/6584)
- Maintenance mode problems https://github.com/inventree/InvenTree/pull/6422
- News Feed timeouts blocking the server https://github.com/inventree/InvenTree/pull/6250
- Importing data with owners https://github.com/inventree/InvenTree/pull/6271

### Changed

- Switched from Django 3 LTS to 4.2 LTS https://github.com/inventree/InvenTree/pull/6173
- Switched to psycog >3 https://github.com/inventree/InvenTree/pull/6573
- Switched from django-allauth 0.59.0 to https://github.com/inventree/InvenTree/pull/6301
- Switched to uv for install (expermintal) https://github.com/inventree/InvenTree/pull/6499
- Switched to ruff for CI linnting https://github.com/inventree/InvenTree/pull/6167

### Removed

- Django-debug-toolbar https://github.com/inventree/InvenTree/pull/6196


## Old releases

Release notes are available https://docs.inventree.org/en/stable/releases/release_notes/
Loading