Skip to content

ci: Fix publish workflow. #26

ci: Fix publish workflow.

ci: Fix publish workflow. #26

Workflow file for this run

name: Publish Package
on:
push:
tags: ["*.*.*"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.8.3
poetry install
- name: Run test
run: |
poetry run tox -e "py312, lint, type, gh-cov-report"
- name: Publish package
run: |
poetry publish --build -u __token__ -p ${{ 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 }}