Skip to content

Commit

Permalink
Integrate in the new repo
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemnoel committed Aug 23, 2024
1 parent 5643ab6 commit 4cba71f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/publish-github-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# workflows/publish-github-release.yml
#
# Publish GitHub Release
# Publish the ParadeDB GitHub Release.
# Publish the ParadeDB pg_analytics GitHub Release.

name: Publish GitHub Release

Expand All @@ -18,7 +18,7 @@ concurrency:

jobs:
publish-github-release:
name: Publish ParadeDB GitHub Release
name: Publish ParadeDB pg_analytics GitHub Release
runs-on: depot-ubuntu-latest-2

steps:
Expand All @@ -31,9 +31,6 @@ jobs:
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "environment=prod" >> $GITHUB_OUTPUT
echo "Using prod configuration..."
elif [[ "${{ github.ref }}" == "refs/heads/staging" ]]; then
echo "environment=staging" >> $GITHUB_OUTPUT
echo "Using staging configuration..."
else
echo "environment=dev" >> $GITHUB_OUTPUT
echo "Using dev configuration..."
Expand All @@ -53,13 +50,6 @@ jobs:
# Increment GHA variable version by 0.0.1 for next release
GHA_VAR_NAME="VERSION_PATCH"
GHA_VAR_VALUE="$(( ${{ vars.VERSION_PATCH }} + 1 ))"
elif [[ "${{ steps.env.outputs.environment }}" == "staging" ]]; then
echo 'Using staging configuration...'
CURRENT_RELEASE_VERSION="${{ vars.VERSION_MAJOR }}.${{ vars.VERSION_MINOR }}.${{ vars.VERSION_PATCH }}-staging-rc.${{ vars.VERSION_STAGING_RC }}"
# Increment GHA variable version by staging-rc.1 for next release
GHA_VAR_NAME="VERSION_STAGING_RC"
GHA_VAR_VALUE="$(( ${{ vars.VERSION_STAGING_RC }} + 1 ))"
elif [[ "${{ steps.env.outputs.environment }}" == "dev" ]]; then
echo 'Using dev configuration...'
CURRENT_RELEASE_VERSION="${{ vars.VERSION_MAJOR }}.${{ vars.VERSION_MINOR }}.${{ vars.VERSION_PATCH }}-dev-rc.${{ vars.VERSION_DEV_RC }}"
Expand All @@ -80,7 +70,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }}
run: |
# on prod we update patch and reset dev/staging RCs to 0
# on prod we update patch and reset dev RC to 0
if [[ "${{ steps.env.outputs.environment }}" == "prod" ]]; then
gh api \
--method PATCH \
Expand All @@ -97,16 +87,8 @@ jobs:
/repos/paradedb/paradedb/actions/variables/VERSION_DEV_RC \
-f name='VERSION_DEV_RC' \
-f value='0'
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/paradedb/paradedb/actions/variables/VERSION_STAGING_RC \
-f name='VERSION_STAGING_RC' \
-f value='0'
# on dev/staging we only update dev/staging RC
elif [[ "${{ steps.env.outputs.environment }}" == "staging" || "${{ steps.env.outputs.environment }}" == "dev" ]]; then
# on dev we only update dev RC
elif [[ "${{ steps.env.outputs.environment }}" == "dev" ]]; then
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish-pg_analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ jobs:

# Note: We need to specify bash as the shell to ensure that it doesn't default to /bin/sh on Debian, which doesn't support the `[[` syntax
- name: Initialize pgrx for Current PostgreSQL Version
working-directory: pg_analytics/
shell: bash
run: |
if [[ "${{ matrix.image }}" == "redhat/ubi8:latest" || "${{ matrix.image }}" == "redhat/ubi9:latest" ]]; then
Expand All @@ -322,7 +321,6 @@ jobs:
cargo pgrx init --pg${{ matrix.pg_version }}=$PG_CONFIG_PATH
- name: Package pg_analytics Extension with pgrx
working-directory: pg_analytics/
run: |
if [[ "${{ matrix.image }}" == "redhat/ubi8:latest" || "${{ matrix.image }}" == "redhat/ubi9:latest" ]]; then
PG_CONFIG_PATH="/usr/pgsql-${{ matrix.pg_version }}/bin/pg_config"
Expand Down Expand Up @@ -358,7 +356,7 @@ jobs:
echo 'Architecture: ${{ matrix.arch }}' >> $CONTROL_FILE
echo 'Depends: postgresql-${{ matrix.pg_version }}' >> $CONTROL_FILE
echo 'Maintainer: ParadeDB <support@paradedb.com>' >> $CONTROL_FILE
echo 'Description: An analytical query engine for Postgres' >> $CONTROL_FILE
echo 'Description: DuckDB-powered analytics for Postgres' >> $CONTROL_FILE
# Create .deb package
sudo chown -R root:root ${package_dir}
Expand All @@ -377,9 +375,9 @@ jobs:
Name: pg_analytics_${{ matrix.pg_version }}
Version: ${{ steps.version.outputs.tag_version }}
Release: 1%{?dist}
Summary: An analytical query engine for Postgres
Summary: DuckDB-powered analytics for Postgres
License: GNU Affero General Public License v3.0
URL: https://github.com/paradedb/paradedb
URL: https://github.com/paradedb/pg_analytics
BuildRequires: postgresql${{ matrix.pg_version }}-devel
Requires: postgresql${{ matrix.pg_version }}-server
Expand Down

0 comments on commit 4cba71f

Please sign in to comment.