Skip to content
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
99 changes: 57 additions & 42 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,68 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0

- name: Create and push to main
run: |
git checkout -b main
git push origin main
# - name: Create and push to main
# run: |
# git checkout -b main
# git push origin main

- name: Checkout release branch
run: git checkout main
- name: Create and push to feature branch
run: |
git checkout -b release-main
git push origin release-main

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Raise PR from release-main to main
uses: peter-evans/create-pull-request@v5
with:
base: main
head: release-main
title: "Automated Release PR: release-main -> main"
body: "This PR contains the automated changes for the release process."
branch: pr-release-main-to-main

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine python-semantic-release setuptools-scm
- name: Checkout release branch
# run: git checkout main
run: git checkout release-main

- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
semantic-release version
semantic-release publish
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"

- name: Build package
run: python -m build
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine python-semantic-release setuptools-scm

- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
semantic-release version
semantic-release publish

- name: Raise PR from main to master
uses: peter-evans/create-pull-request@v5
with:
base: master
head: main
title: 'Release PR: main -> master'
body: 'This PR merges the changes from the main branch back into master after the release.'
branch: pr-main-to-master
- name: Build package
run: python -m build

- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Raise PR from main to master
uses: peter-evans/create-pull-request@v5
with:
base: master
head: main
title: "Release PR: main -> master"
body: "This PR merges the changes from the main branch back into master after the release."
branch: pr-main-to-master
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black

- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
require_serial: true
args: [
"-rn", # Only display messages
"-sn", # Don't display the score
]
files: ^app/.*\.py$
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

# Changelog

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- [List new features or enhancements added but not yet released]

### Changed

- [List changes, improvements, or modifications made but not yet released]

### Fixed

- [List bug fixes or corrections made but not yet released]

## [Version] - YYYY-MM-DD

### Added

- [List new features or enhancements added in this version]

### Changed

- [List changes, improvements, or modifications made in this version]

### Fixed

- [List bug fixes or corrections made in this version]

## [Older Versions]

[Repeat the above sections for older versions of your project]

## Contributing

Please read [CONTRIBUTING.md](./contributing-template.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Authors

- Author 1
- Author 2

## License

This project is licensed under the [License Name] - see the [LICENSE.md](./license-template.md) file for details.

## Customization

You can customize this changelog to meet the specific needs and preferences of your project. Feel free to modify the structure, add more details, or change the formatting to better suit your project's versioning and documentation requirements.
Loading
Loading