Add GitHub workflows. #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish | ||
on: | ||
push: | ||
branches: [master, dev] | ||
# release: | ||
# types: [published] | ||
matrix: | ||
Check failure on line 8 in .github/workflows/build.yml GitHub Actions / Build and publishInvalid workflow file
|
||
version: ["3.9", "3.10", "3.11", "3.12"] | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: | ||
- windows-latest | ||
- macos-latest | ||
- ubuntu-latest | ||
version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Install Poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ os.version }} | ||
cache: "poetry" | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Build | ||
run: | | ||
poetry install | ||
# - name: Check | ||
# run: poetry run python -c "import cshogi" | ||
# - name: Publish | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
# env: | ||
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
# run: twine upload dist/* |