diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9e003ec --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d2e9f4b --- /dev/null +++ b/.github/workflows/release.yml @@ -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
\nUncategorized\n\n#{{UNCATEGORIZED}}\n
\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}}