Skip to content

fix(ci): trigger settings #61

fix(ci): trigger settings

fix(ci): trigger settings #61

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
version:
description: Version to release (ex. `0.1.0`)
required: false
type: string
push:
branches:
# Run on all commits to main, because GitHub somehow doesn't support only specifying tag patterns
# (filtering must be done at the per-job level with an `if`)
- main
# Run on auto-generated release PRs
- prep-release-v[0-9]+\.[0-9]+\.[0-9]+
tags:
# Run on released tags (created by automated post-merge release-tagging), to generate the actual release
- v[0-9]+\.[0-9]+\.[0-9]+
jobs:
build-rpm:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/prep-release-v') }}
strategy:
matrix:
config:
- pgrx:
pg-version: pg15
pg:
version: 15.6
- pgrx:
pg-version: pg16
pg:
version: 16.2
steps:
- uses: actions/checkout@v3
- name: Build the RPM (reuse workflow)
uses: ./.github/workflows/build-rpm
with:
artifact-upload: true
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}
build-zip-gnu:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/prep-release-v') }}
container:
image: ghcr.io/vadosware/pg_idkit/builder-gnu:0.1.x
strategy:
matrix:
config:
- pgrx:
pg-version: pg15
pg:
version: 15.6
- pgrx:
pg-version: pg16
pg:
version: 16.2
steps:
- uses: actions/checkout@v3
- name: Build the package (reuse workflow)
uses: ./.github/workflows/build-and-test-gnu
with:
artifact-upload: true
artifact-tarball-suffix: "-${{ matrix.config.pgrx.pg-version }}-gnu"
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}
release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/prep-release-v') }}
permissions:
contents: write
needs:
- build-rpm
- build-zip-gnu
steps:
# Checkout the repository
- uses: actions/checkout@v3
# Download all artifacts
- uses: actions/download-artifact@v3
with:
path: artifacts
# Create release (pre-release if we're prepping)
- name: Create release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
draft: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
tag_name: ${{ github.ref || inputs.version }}
# NOTE: while we have the CHANGELOG file, it always contains *all* changes,
# so we will use the generated GitHub commits for now
generate_release_notes: true
files: |
./artifacts/*/*