Skip to content

chore(deps): update plugin com.google.cloud.artifactregistry.gradle-p… #362

chore(deps): update plugin com.google.cloud.artifactregistry.gradle-p…

chore(deps): update plugin com.google.cloud.artifactregistry.gradle-p… #362

name: Semantic Release
on:
push:
branches:
- "main"
- "alpha"
- "beta"
paths-ignore:
- "docs/**"
jobs:
semantic-release:
name: Release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, 'chore(deps)')"
# based on: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers#running-jobs-directly-on-the-runner-machine
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Ensure that the GH Actions default token isn't configured for git access, which intervenes with the semantic-release process.
persist-credentials: false
- uses: bufbuild/buf-setup-action@v1
if: github.event.pull_request.merged
- name: Delete BSR drafts
if: github.event.pull_request.merged && !contains(fromJSON('["main", "alpha", "beta"]'), github.event.pull_request.head.ref)
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: |
buf beta registry draft delete buf.build/getstrm/pace:${{ github.event.pull_request.head.ref }} --force || true
# Gradle build and test
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- run: ./gradlew build -PciBuild
# Semantic Release
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm i --non-interactive --pure-lockfile
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_NAME: ${{ secrets.BOT_USERNAME }}
GIT_COMMITTER_NAME: ${{ secrets.BOT_USERNAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}
run: npm run semantic-release -- --repository-url "$(git config --get remote.origin.url)"