Skip to content

ci(gh-action): Fix poetry publish arguments #22

ci(gh-action): Fix poetry publish arguments

ci(gh-action): Fix poetry publish arguments #22

Workflow file for this run

name: Publish Package
on:
push:
tags: ["*.*.*"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.8.3
poetry install
- name: Lint code
run: |
poetry run flake8
- name: Type check
run: |
poetry run mypy
- name: Test
run: |
poetry run coverage run -m pytest
- name: Publish package
run: |
poetry publish --build -u ${{ secrets.PYPI_API_TOKEN }}
- name: Set release data
id: release_settings
run: |
BODY_FILE=release_note.md
make print-changelog >> ${BODY_FILE}
echo "::set-output name=version::${GITHUB_REF#refs/*/}"
echo "::set-output name=body_file::${BODY_FILE}"
- name: Create Repository Release
uses: ncipollo/release-action@v1
with:
name: "EorzeaEnv ${{ steps.release_settings.outputs.version }}"
token: ${{ secrets.GITHUB_TOKEN }}
bodyFile: ${{ steps.release_settings.outputs.body_file }}