Skip to content

Commit

Permalink
Fix deploy by using local directory (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki authored Aug 16, 2024
1 parent 7c4d7de commit 69105e0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
id: build_dist
- name: determine tag
run: echo "tag=${GITHUB_REF/refs\/tags\/v/}" >> "$GITHUB_ENV"
- name: debug dist
run: |
set -x
echo "dist=${{ steps.build_dist.outputs.dist }}"
ls -l ${{ steps.build_dist.outputs.dist }}
mkdir -p dist
cp ${{ steps.build_dist.outputs.dist }}/*.whl ./dist/
cp ${{ steps.build_dist.outputs.dist }}/*.gz ./dist/
- name: Create Release
uses: "softprops/action-gh-release@v2"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
Expand All @@ -31,10 +42,9 @@ jobs:
draft: false
prerelease: ${{ contains(env.tag, 'rc') || contains(env.tag, 'a') || contains(env.tag, 'b') }}
target_commitish: ${{ github.sha }}
files: ${{ steps.build_dist.outputs.dist }}
files: dist/*
- name: Publish PyPI Package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TWINE_API_KEY }}
packages-dir: ${{ steps.build_dist.outputs.dist }}

0 comments on commit 69105e0

Please sign in to comment.