ci: bump GoogleCloudPlatform/release-please-action from 3.7.6 to 3.7.11 #32
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: "CI/CD" | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
- reopened | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres_pass | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
env: | |
ENV: cicd | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get Metadata | |
id: metadata | |
uses: contiamo/git-metadata-action@main | |
- name: Setup Task | |
uses: arduino/setup-task@v1 | |
# based on https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
cache: poetry | |
- name: Setup package | |
run: task setup | |
- name: Setup database | |
run: task sample-view | |
- name: Test package | |
run: task run | |
publish: | |
# Only run if we're on main branch or it's a release: | |
if: github.event_name == 'release' | |
needs: [test] | |
runs-on: ubuntu-latest | |
name: Build and Publish package | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get Metadata | |
id: metadata | |
uses: contiamo/git-metadata-action@main | |
- name: Setup Task | |
uses: arduino/setup-task@v1 | |
# based on https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
cache: poetry | |
- name: Setup package | |
run: task setup | |
- name: Build package | |
run: task build | |
- name: Publish package | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
run: task publish |