diff --git a/.github/RELEASE-TEMPLATE.md b/.github/RELEASE-TEMPLATE.md index 51c4c75..b671f0b 100644 --- a/.github/RELEASE-TEMPLATE.md +++ b/.github/RELEASE-TEMPLATE.md @@ -1,4 +1 @@ -# Announcements -* First announcement - # Changes diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 377e0fe..78d7cc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,47 +57,3 @@ jobs: poetry run pytest - uses: codecov/codecov-action@v2 - - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.9] - needs: integration - if: github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Load cached Poetry installation - uses: actions/cache@v2 - with: - path: ~/.local # the path depends on the OS - key: poetry-0 # increment to reset cache - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - - - name: Build and publish to pypi - uses: JRubics/poetry-publish@v1.8 - with: - pypi_token: ${{ secrets.PYPI_TOKEN }} - python_version: ${{ matrix.python-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c45184b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,51 @@ +on: + release: + types: + - published + +name: PyPI Publish + +jobs: + publish: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9] + needs: integration + if: github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Load cached Poetry installation + uses: actions/cache@v2 + with: + path: ~/.local # the path depends on the OS + key: poetry-0 # increment to reset cache + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v1.8 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} + python_version: ${{ matrix.python-version }}