-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from yutanagano/add_gh_workflows
Add github workflows
- Loading branch information
Showing
3 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: publish to PyPI | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check out branch | ||
uses: actions/checkout@v4 | ||
- name: set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
- name: install build | ||
run: python3 -m pip install build --user | ||
- name: build wheel and source tarball | ||
run: python3 -m build | ||
- name: store distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
publish: | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/sceptr | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: download dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: tests | ||
on: pull_request | ||
jobs: | ||
run_tox: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python_ver: ['3.12'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out branch | ||
uses: actions/checkout@v4 | ||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python_ver }} | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Run tox | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters