-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize actions for reuse across adapters (#54)
- Loading branch information
1 parent
60005a0
commit f896eff
Showing
9 changed files
with
112 additions
and
53 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,36 @@ | ||
name: Build - `hatch` | ||
description: Build artifacts using the `hatch` build backend | ||
|
||
inputs: | ||
build-command: | ||
description: The command to build distributable artifacts | ||
default: "hatch build" | ||
check-command: | ||
description: The command to check built artifacts | ||
default: "hatch run build:check-all" | ||
working-dir: | ||
description: Where to run commands from, supports namespace packaging | ||
default: "./" | ||
artifacts-dir: | ||
description: Where to upload the artifacts | ||
default: "dist" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: Build artifacts | ||
run: ${{ inputs.build-command }} | ||
shell: bash | ||
working-directory: ${{ inputs.working-dir }} | ||
|
||
- name: Check artifacts | ||
run: ${{ inputs.check-command }} | ||
shell: bash | ||
working-directory: ${{ inputs.working-dir }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifacts-dir}} | ||
path: ${{ inputs.working-dir }}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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: Publish PyPI | ||
name: Publish - PyPI | ||
description: Publish artifacts saved during build step to PyPI | ||
|
||
inputs: | ||
python-version: | ||
description: Create an environment with the appropriate version of python and hatch installed | ||
default: "3.11" | ||
artifacts-dir: | ||
description: Where to download the artifacts | ||
default: "dist" | ||
repository-url: | ||
description: The PyPI index to publish to, test or prod | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup environment | ||
uses: ./.github/actions/setup-environment | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Build artifacts | ||
run: hatch build | ||
shell: bash | ||
|
||
- name: Check artifacts | ||
run: hatch run build:check-all | ||
shell: bash | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifacts-dir }} | ||
path: dist/ | ||
|
||
- name: Publish artifacts to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: ${{ inputs.repository-url }} |
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 was deleted.
Oops, something went wrong.
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,22 @@ | ||
name: Setup - `hatch` | ||
description: Setup a python environment with `hatch` installed | ||
|
||
inputs: | ||
setup-command: | ||
description: The command to setup development dependencies | ||
default: "python -m pip install hatch" | ||
python-version: | ||
description: The version of python to install | ||
default: "3.11" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install dev dependencies | ||
run: ${{ inputs.setup-command }} | ||
shell: bash |
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
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