Skip to content

fix: add id to step

fix: add id to step #6

Workflow file for this run

name: Test/Lint/Release
permissions:
contents: write
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test-lint:
if: ${{ !startsWith(github.event.head_commit.message, 'tag') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: poetry
- run: poetry install
- run: poetry run pytest -v signway_sdk
- run: poetry run flake8
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- unit-test-lint
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0' # https://github.com/actions/checkout/issues/217
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: poetry
- name: Tag
id: tag
run: |
version=$(.github/semver.sh)
git config user.name github-actions
git config user.email [email protected]
poetry version $version
git add .
git commit -m "tag: v$version"
git tag "v$version"
git push
git push --tags
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Release
run: gh release create "v${{ steps.tag.outputs.version }}"
env:
GH_TOKEN: ${{ github.token }}
- run: poetry build
- run: poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}