Skip to content

Commit

Permalink
Merge pull request #1 from tardis4500/feature/python-3.12
Browse files Browse the repository at this point in the history
Upgrade to Python 3.12.
  • Loading branch information
tardis4500 authored Jan 2, 2025
2 parents 5851d74 + 8c37573 commit 3c87843
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 151 deletions.
93 changes: 88 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: Git Stream Build
run-name: Git Stream Build - ${{ github.run_id }}
name: Git Stream Build and Release
run-name: Git Stream Build and Release - ${{ github.run_id }}

on:
workflow_dispatch:
push:
branches:
- main
- release/*
- feature/*
pull_request:
branches:
- main
- release/*
- feature/*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
ARTIFACTS_DIR: artifacts
GH_TOKEN: ${{ github.token }}
VJER_ENV: development

jobs:
test:
uses: tardis4500/shared-actions/.github/workflows/vjer.yml@main
Expand All @@ -28,16 +37,16 @@ jobs:
- macos-latest
- windows-latest
python-version:
- "3.11"
- "3.12"
- "3.13"

build:
needs: test
uses: tardis4500/shared-actions/.github/workflows/vjer.yml@main
with:
action: build
os: ubuntu-latest
python-version: "3.11"
python-version: "3.12"
use-flit: true

install-test:
Expand All @@ -54,5 +63,79 @@ jobs:
- macos-latest
- windows-latest
python-version:
- "3.11"
- "3.12"
- "3.13"

pre_release:
needs: install-test
if: (github.event_name != 'pull_request') && ((github.ref_name == 'main') || startsWith(github.ref_name, 'release/'))
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
environment: pre_release
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Install vjer
run: pip install vjer
- name: Prepare Git
run: |
git config user.name "${{ github.triggering_actor }}"
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com"
git pull
- name: Publish to Test PyPi
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: ${{ env.ARTIFACTS_DIR }}
- name: Run post-publish steps
run: vjer pre_release

release:
needs: pre_release
if: (github.event_name != 'pull_request') && ((github.ref_name == 'main') || startsWith(github.ref_name, 'release/'))
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install vjer
run: pip install vjer
- name: Prepare Git
run: |
git config user.name "${{ github.triggering_actor }}"
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com"
git pull
- name: Run post-publish steps
run: vjer release
- name: Publish to PyPi
uses: pypa/[email protected]
with:
packages-dir: ${{ env.ARTIFACTS_DIR }}
- name: Upload released artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACTS_DIR }}-released
path: ${{ env.ARTIFACTS_DIR }}

# cSpell:ignore pypa
37 changes: 0 additions & 37 deletions .github/workflows/publish.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/pypi-publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2

python:
version: "3.11"
version: "3.12"
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Current Release

### [1.0.1] - 2024-09-02
### [2.0.0] - 2025-01-01

- Changed
- Fix publish workflow.
- Upgrade to Python 3.12.

## Release History

### [1.0.1] - 2024-09-02

- Changed
- Fix publish workflow.

### [1.0.0] - 2024-09-02

- Initial release
2 changes: 1 addition & 1 deletion git_stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__summary__ = 'CI/CD Toolkit'
__uri__ = 'https://github.com/tardis4500/git-stream/'

__version__ = '1.0.2rc0'
__version__ = '2.0.0rc0'
__build_name__ = '{var:build_name}'
__build_date__ = '{var:build_date}'

Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ readme = "DOCUMENTATION.md"
license = { file = "LICENSE" }
dynamic = ["version", "description"]

requires-python = "~=3.11"
requires-python = "~=3.12"
keywords = ["python", "programming", "utilities"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",

"Operating System :: OS Independent",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",

"Intended Audience :: Developers",
"Topic :: Software Development",
Expand Down Expand Up @@ -76,7 +76,7 @@ module = "xmlrunner.*"
ignore_missing_imports = true

[tool.bumpver]
current_version = "v1.0.2rc0"
current_version = "v2.0.0rc0"
version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "bump version {old_version} -> {new_version} [skip ci]"
commit = true
Expand All @@ -85,3 +85,5 @@ push = true

[tool.bumpver.file_patterns]
"git_stream/__init__.py" = ["__version__ = '{pep440_version}'"]

# cSpell:ignore buildapi bumpver xmlrunner pytagnum
11 changes: 0 additions & 11 deletions util/New-Env.ps1

This file was deleted.

5 changes: 3 additions & 2 deletions util/Update-Env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ Set-StrictMode -Version Latest

python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager setuptools wheel
pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
flit install --deps all
pip install --upgrade --upgrade-strategy eager flit
pip freeze | ForEach-Object{$_.split('==')[0]} | ForEach-Object{pip install --upgrade $_}
flit install --only-deps --deps all
11 changes: 0 additions & 11 deletions util/new-env.sh

This file was deleted.

3 changes: 2 additions & 1 deletion util/update-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ set -eu

python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager setuptools wheel
pip install --upgrade --upgrade-strategy eager flit
pip freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install --upgrade
flit install -s --deps all
flit install -s --only-deps --deps all

0 comments on commit 3c87843

Please sign in to comment.