diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000..30e07ba --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,24 @@ +changelog: + exclude: + labels: + - duplicate + - wontfix + - invalid + authors: + - octocat + categories: + - title: "🛠️ Breaking Changes" + labels: + - "breaking change" + - title: "✨ Features" + labels: + - enhancement + - title: "🐛 Bug Fixes" + labels: + - bug + - title: "📚 Documentation" + labels: + - documentation + - title: "Other Changes" + labels: + - "*" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..dc70094 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + paths: + - "**" + schedule: + - cron: '0 1 * * *' + # Able to call by other workflow + workflow_call: + # Able to call on GitHub + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + markdown_lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v18 + with: + config: '.markdownlint.yaml' + globs: '**/*.md' + + python_lint_format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d3723a6 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Release + +on: + push: + tags: + - v* + workflow_dispatch: + +concurrency: + group: "release-${{ github.head_ref || github.ref }}" + cancel-in-progress: true + +jobs: + ci: + uses: ./.github/workflows/ci.yaml + + tag_release_artifacts: + # This only runs if this workflow is initiated via a tag-push with pattern 'v*' + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + name: collect v-tag release artifacts + runs-on: ubuntu-latest + needs: + - ci + permissions: write-all + steps: + - uses: actions/checkout@v4 + + - name: 'Create Release' + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: | + README.md + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 5dbc49a..2490b18 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ __pycache__ # Ignore poetry .venv -