-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add standalone installation using zipapp
- Loading branch information
1 parent
46a2118
commit ff0b971
Showing
3 changed files
with
66 additions
and
16 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 |
---|---|---|
|
@@ -2,12 +2,20 @@ name: build hatch | |
|
||
on: | ||
push: | ||
tags: | ||
- hatch-v* | ||
# tags: | ||
# - hatch-v* | ||
branches: | ||
- beyondevil/* | ||
pull_request: | ||
branches: | ||
- beyondevil/* | ||
|
||
concurrency: | ||
group: build-hatch-${{ github.head_ref }} | ||
|
||
env: | ||
STABLE_PYTHON_VERSION: '3.11' | ||
|
||
jobs: | ||
build: | ||
name: Build wheels and source distribution | ||
|
@@ -28,21 +36,50 @@ jobs: | |
path: dist/* | ||
if-no-files-found: error | ||
|
||
publish: | ||
name: Publish release | ||
# publish: | ||
# name: Publish release | ||
# needs: | ||
# - build | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: artifacts | ||
# path: dist | ||
# | ||
# - name: Push build artifacts to PyPI | ||
# uses: pypa/[email protected] | ||
# with: | ||
# skip_existing: true | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN_HATCH }} | ||
|
||
build-zipapp: | ||
name: Build zipapp | ||
needs: | ||
- build | ||
- build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: dist | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Push build artifacts to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
skip_existing: true | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN_HATCH }} | ||
- name: Set up Python ${{ env.STABLE_PYTHON_VERSION }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.STABLE_PYTHON_VERSION }} | ||
|
||
- name: Upgrade pip, Install shiv | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install shiv | ||
- name: Build zipapp | ||
run: shiv -c hatch -o ./hatch.pyz . | ||
|
||
- name: Test zipapp | ||
run: python ./hatch.pyz --version | ||
|
||
# - name: Upload to releases | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# files: hatch.pyz |
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