Skip to content

Commit

Permalink
Merge pull request #103 from ali-zahedi/fix/githubaction
Browse files Browse the repository at this point in the history
Fix/githubaction
  • Loading branch information
ali-zahedi authored Mar 28, 2024
2 parents fce3daa + 7a36ad8 commit 74e790b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,28 @@ jobs:
NEW_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
- name: Update package version
run: |
echo "$NEW_TAG"
sed -i "s/__version__ = \"1.0.0\"/__version__ = \"$NEW_TAG\"/g" azbankgateways/__init__.py
- name: Set version output
id: set_output
run: echo "::set-output name=version::$NEW_TAG"

pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: versioning_pipeline
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Build package
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Update package version
run: |
VERSION=${{ needs.versioning_pipeline.outputs.version }}
echo "Version: $VERSION"
sed -i "s/__version__ = \"1.0.0\"/__version__ = \"$VERSION\"/g" azbankgateways/__init__.py
- name: Install build
run: python -m pip install build
- name: Build dist
Expand Down

0 comments on commit 74e790b

Please # to comment.