Skip to content

Commit

Permalink
feat: add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousDolphin committed Nov 28, 2024
1 parent 0cac59d commit 9002511
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: actions-runner-cpu
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update pyproject.toml with new version tag
run: |
sed -i 's/version = ".*"/version = "${{ steps.tag_version.outputs.new_tag }}"/' pyproject.toml
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[bot]: update version to ${{ steps.tag_version.outputs.new_tag }}"
branch: main
file_pattern: pyproject.toml
add_options: --update
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
generateReleaseNotes: true
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include = ["focoos**"]

[project]
name = "focoos"
version = "0.0.1"
description = "Focoos SDK"
readme = "README.md"
requires-python = ">=3.10"
Expand All @@ -20,7 +21,7 @@ dependencies = [
"numpy~=1.26.4",
"scipy~=1.14.1",
]
version = "0.0.1"

authors = [{ name = "focoos.ai", email = "[email protected]" }]
keywords = [
"computer_vision",
Expand Down

0 comments on commit 9002511

Please sign in to comment.