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
2 changes: 2 additions & 0 deletions .github/workflows/bandit.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Bandit Security Analysis

on: [push]

jobs:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build_and_publish_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ jobs:
if [ "${{ steps.vars.outputs.latest }}" = "true" ]; then
echo "Also tagged as :latest"
fi
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/') && steps.vars.outputs.latest == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.vars.outputs.tag }}
name: Release ${{ steps.vars.outputs.tag }}
generate_release_notes: true
2 changes: 2 additions & 0 deletions .github/workflows/isort.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: isort

on: [push]

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: mypy

on: [push]

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: pytest

on: [push]

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/radon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: radon

on: [push]

jobs:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release and Changelog

on:
release:
types: [created]
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Get tag name
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Generate release notes
id: release_notes
uses: actions/github-script@v7
with:
script: |
const tag = process.env.GITHUB_REF_NAME;
const { data: commits } = await github.rest.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 20,
});

const notes = commits.map(c => `- ${c.commit.message.split('\n')[0]}`).join('\n');
return notes;

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: Release ${{ steps.tag.outputs.tag }}
body: ${{ steps.release_notes.outputs.result }}

- name: Update CHANGELOG.md
run: |
echo "## ${{ steps.tag.outputs.tag }}" >> CHANGELOG.md
echo "" >> CHANGELOG.md
echo "${{ steps.release_notes.outputs.result }}" >> CHANGELOG.md
echo "" >> CHANGELOG.md
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG for ${{ steps.tag.outputs.tag }}"
git push origin HEAD
2 changes: 2 additions & 0 deletions .github/workflows/ruff_format.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: ruff_format

on: [push]

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ruff_lint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: ruff_lint

on: [push]

jobs:
Expand Down
Loading