Skip to content

debug(ci): always upload #151

debug(ci): always upload

debug(ci): always upload #151

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]+
- fix(ci)=release-zip-build # TODO: remove
tags:
# Run on released tags (created by automated post-merge release-tagging), to generate the actual release
- v[0-9]+\.[0-9]+\.[0-9]+
concurrency:
group: release
jobs:
build-rpm:
runs-on: ubuntu-latest
strategy:
matrix:
config:
# - pgrx:
# pg-version: pg15
# pg:
# version: "15.12"
# - pgrx:
# pg-version: pg16
# pg:
# version: "16.8"
- pgrx:
pg-version: pg17
pg:
version: "17.4"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build the RPM (reuse workflow)
uses: ./.github/workflows/build-rpm
with:
artifact-upload: ${{ startsWith(github.ref, 'refs/tags/v') }}
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}
build-zip:
runs-on: ubuntu-latest
container:
image: ghcr.io/vadosware/pg_idkit/builder-${{ matrix.libc }}:0.1.x
strategy:
matrix:
libc:
- gnu
- musl
config:
# - pgrx:
# pg-version: pg15
# pg:
# version: "15.12"
# - pgrx:
# pg-version: pg16
# pg:
# version: "16.8"
- pgrx:
pg-version: pg17
pg:
version: "17.4"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and test
uses: ./.github/workflows/build-and-test
with:
libc: ${{ matrix.libc }}
artifact-upload: true
artifact-tarball-suffix: "-${{ matrix.config.pgrx.pg-version }}-${{ matrix.libc }}"
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pkg-pg-version: ${{ matrix.config.pg.version }}
test-rpm:
runs-on: ubuntu-latest
needs:
- build-rpm
steps:
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: pg_idkit-*.rpm
test-zip:
runs-on: ubuntu-latest
needs:
- build-zip
steps:
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: pg_idkit-*.tar.gz
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- test-rpm
- test-zip
steps:
# Checkout the repository
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Download all artifacts
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: artifacts
# Create release (pre-release if we're prepping)
- name: Create release
uses: softprops/action-gh-release@v1
with:
prerelease: true
draft: true
tag_name: ${{ github.ref_name || 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/*/*