Skip to content

Commit

Permalink
Add PGXN extension build.
Browse files Browse the repository at this point in the history
  • Loading branch information
arkhipov committed Mar 31, 2023
1 parent b9f9b21 commit 5d054e7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.vcxproj text eol=crlf
*.sln export-ignore
*.vcx* export-ignore
.* export-ignore
32 changes: 32 additions & 0 deletions .github/workflows/build-pgxn-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build PGXN Extension

on:
push:
tags:
- '*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Package extension
id: package
run: |
extension_name=$(grep -m 1 '"name":' META.json | sed -e 's/[[:space:]]*"name":[[:space:]]*"\([^"]*\)",/\1/')
extension_version=$(grep -m 1 '[[:space:]]\{8\}"version":' META.json | sed -e 's/[[:space:]]*"version":[[:space:]]*"\([^"]*\)",\{0,1\}/\1/')
echo "extension_name=$extension_name" >> $GITHUB_OUTPUT
echo "extension_version=$extension_version" >> $GITHUB_OUTPUT
git archive --format zip --prefix=$extension_name-$extension_version/ -o $extension_name-$extension_version.zip HEAD
- name: Deploy Artifacts
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
${{ steps.package.outputs.extension_name }}-${{ steps.package.outputs.extension_version }}.zip
2 changes: 2 additions & 0 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
} else {
& "$env:PG_ROOT\bin\pg_regress.exe" "$env:PSQL_OPT=$env:PG_ROOT\bin" --dbname=pl_regression install acl_oid acl_uuid acl_int8 acl_int4 2>&1 | Out-Default
}
if ($LASTEXITCODE -ne 0) {
Get-Content -Path ".\regression.diffs" | Out-Printer
Write-Error "Tests failed"
Expand Down Expand Up @@ -135,5 +136,6 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: |
acl-pg${{ env.PG_VERSION }}-${{ matrix.platform }}.zip

0 comments on commit 5d054e7

Please sign in to comment.