v2.0.0 - Support new trackpad firmware #8
Workflow file for this run
This file contains hidden or 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
name: Release Actions | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
upload-release-assets: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Translate Repo Name For Build Tools filename_prefix | |
id: repo-name | |
run: | | |
echo repo-name=$( | |
echo ${{ github.repository }} | | |
awk -F '\/' '{ print tolower($2) }' | | |
tr '_' '-' | |
) >> $GITHUB_OUTPUT | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Checkout Current Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Checkout tools repo | |
uses: actions/checkout@v4 | |
with: | |
repository: adafruit/actions-ci-circuitpython-libs | |
path: actions-ci | |
- name: Install deps | |
run: | | |
source actions-ci/install.sh | |
- name: Build assets | |
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . | |
- name: Archive bundles | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundles | |
path: ${{ github.workspace }}/bundles/ | |
- name: Upload Release Assets | |
if: github.event_name == 'release' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: "bundles/*" | |
upload-pypi: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install build tools | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine | |
- name: Build distributions | |
run: python -m build | |
- name: Check distributions | |
run: twine check dist/* | |
- name: Publish package (to TestPyPI) | |
if: github.event_name == 'workflow_dispatch' && github.repository == '2bndy5/CircuitPython_Cirque_Pinnacle' | |
uses: pypa/[email protected] | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
- name: Publish package (to PyPI) | |
if: github.event_name != 'workflow_dispatch' && github.repository == '2bndy5/CircuitPython_Cirque_Pinnacle' | |
uses: pypa/[email protected] |