-
Notifications
You must be signed in to change notification settings - Fork 4
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 #1 from adafruit/workflows
Workflows
- Loading branch information
Showing
6 changed files
with
111 additions
and
4 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,57 @@ | ||
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Build CI | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: Translate Repo Name For Build Tools filename_prefix | ||
id: repo-name | ||
run: | | ||
echo ::set-output name=repo-name::$( | ||
echo ${{ github.repository }} | | ||
awk -F '\/' '{ print tolower($2) }' | | ||
tr '_' '-' | ||
) | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
- name: Versions | ||
run: | | ||
python3 --version | ||
- name: Checkout Current Repo | ||
uses: actions/checkout@v1 | ||
- name: Library version | ||
run: git describe --dirty --always --tags | ||
- name: install dependencies | ||
run: | | ||
pip install --upgrade setuptools wheel twine readme_renderer testresources pre-commit build | ||
- name: Setup problem matchers | ||
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 | ||
- name: Pre-commit hooks | ||
run: | | ||
pre-commit run --all-files | ||
- name: Build Python package | ||
run: | | ||
python -mbuild | ||
twine check dist/* | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheel | ||
path: | | ||
dist/*.whl | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: tar | ||
path: | | ||
dist/*.tar* |
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,19 @@ | ||
# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Failure help text | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build CI"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
post-help: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} | ||
steps: | ||
- name: Post comment to help | ||
uses: adafruit/circuitpython-action-library-ci-failed@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,30 @@ | ||
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Release Actions | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
upload-pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
- uses: actions/checkout@v1 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine build | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.pypi_username }} | ||
TWINE_PASSWORD: ${{ secrets.pypi_password }} | ||
run: | | ||
python -mbuild | ||
twine upload dist/* |
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 |
---|---|---|
|
@@ -50,3 +50,6 @@ _build | |
build | ||
*.egg-info | ||
fluxvis/__version__.py | ||
|
||
# Built by `python3 -mbuild` | ||
dist |
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
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