-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e36e34
commit 585dc22
Showing
6 changed files
with
63 additions
and
31 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,35 +1,25 @@ | ||
name: Publish PyPI | ||
name: Publish - PyPI | ||
description: Publish artifacts saved during build step to PyPI | ||
|
||
inputs: | ||
artifacts-dir: | ||
description: Where to download the artifacts | ||
default: "/dist" | ||
pypi-repository-url: | ||
description: The PyPI index to publish to, test or prod | ||
required: true | ||
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: "./" | ||
|
||
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: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifacts-dir }} | ||
path: dist/ | ||
|
||
- name: Publish artifacts | ||
- name: Publish artifacts to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: ${{ inputs.pypi-repository-url }} | ||
packages-dir: ${{ inputs.working-dir }}dist |
3 changes: 2 additions & 1 deletion
3
.github/actions/setup-environment/action.yml → .github/actions/setup-hatch/action.yml
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