Skip to content

Commit

Permalink
Add GitHub CI.
Browse files Browse the repository at this point in the history
Signed-off-by: ChenYing Kuo <[email protected]>
  • Loading branch information
evshary committed Dec 31, 2024
1 parent 9c636a8 commit 8d66035
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -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:
- "*"
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ __pycache__

# Ignore poetry
.venv

0 comments on commit 8d66035

Please sign in to comment.