Skip to content

Commit

Permalink
Merge pull request #36 from qiqb-osaka/feature/release-flow5
Browse files Browse the repository at this point in the history
publishで利用するライブラリを変更
  • Loading branch information
snuffkin authored Nov 28, 2024
2 parents 7477ec4 + fae7097 commit 07d99d7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 86 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Package and release

on:
release:
types: [published]

jobs:
release-build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install poetry
uses: abatilo/actions-poetry@v2

- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}

- name: Install the project dependencies
run: poetry install

- name: Build
run: poetry build

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
if-no-files-found: error

release:
needs:
- release-build
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/quri-parts-riqu

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
86 changes: 0 additions & 86 deletions .github/workflows/release.yaml

This file was deleted.

0 comments on commit 07d99d7

Please sign in to comment.