Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pushing tag to origin #52

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Add version tag
- name: Tag commit with version
env:
VERSION: ${{ inputs.version }}
run: git tag v$VERSION
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,25 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Add version tag
- name: Build version tag
id: build-version-tag
run: |
VERSION=$(echo "$GITHUB_HEAD_REF" | sed 's/release\///')
git tag v"$VERSION"
echo "{VERSION_TAG}={v$VERSION}" >> "$GITHUB_OUTPUT"
- name: Tag commit with version
env:
VERSION_TAG: ${{ steps.build-version-tag.outputs.VERSION_TAG }}
run: git tag "$VERSION_TAG"
- name: Build new package
run: tox run -e build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Push version tag
run: git push --tags
env:
VERSION_TAG: ${{ steps.build-version-tag.outputs.VERSION_TAG }}
run: git push origin "$VERSION_TAG"
- name: Archive package
uses: actions/upload-artifact@v3
with:
Expand Down