Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jun 29, 2024
1 parent 53676af commit a5d10ce
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci

on:
push:
branches:
- main
pull_request:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: ['3.8']

steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3

- name: Install make
if: matrix.os == 'windows-latest'
run: |
choco install make
- name: Install main
run: |
pip install -e git+https://github.com/osamproject/osam-core.git#egg=osam-core
pip install .[test]
- name: Lint
run: |
make lint
# - name: Test
# run: |
# make test

- name: Install from dist
shell: bash
run: |
make build
pip install dist/osam*.tar.gz
pip install dist/osam*.whl
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>\n\n---\n\n- For my daily development update, check [my Twitter/X](https://twitter.com/wkentaro_).\n- If you'd like to support this project, check [my sponsoring page](https://github.com/sponsors/wkentaro).",
"pr_template": "- #{{TITLE}} ##{{NUMBER}}",
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feature"]
},
{
"title": "## ✨ Enhancement",
"labels": ["enhancement"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix"]
},
{
"title": "## 💬 Other",
"labels": ["other"]
}
]
}
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
body: ${{steps.github_release.outputs.changelog}}

0 comments on commit a5d10ce

Please sign in to comment.