Skip to content

miracelwhipp is building postgres 🚀 #23

miracelwhipp is building postgres 🚀

miracelwhipp is building postgres 🚀 #23

name: build postgres on multiple platforms
run-name: ${{ github.actor }} is building postgres 🚀
on:
workflow_dispatch:
inputs:
tag:
description: "postgres tag to build in the format REL_<MAJOR>_<MINOR>"
required: true
default: REL_16_2 # DO NOT CHANGE THIS LINE. this default value will be overridden automatically
workflow_call:
inputs:
tag:
description: "postgres tag to build in the format REL_<MAJOR>_<MINOR>"
required: true
type: string
jobs:
build-osx:
runs-on: macos-latest
steps:
- run: echo build event.tag ${{ inputs.tag }}
- name: Check out postgres code
uses: actions/checkout@v4
with:
repository: postgres/postgres
ref: refs/tags/${{ inputs.tag }}
fetch-tags: true
- run: curl https://raw.githubusercontent.com/eitco/build-postgres/${{ github.ref_name }}/build.sh > build.sh && chmod +x build.sh
- name: compile postgres sources and pack
id: build
run: ./build.sh "${{ inputs.tag }}" osx
- uses: ncipollo/release-action@v1.14.0
with:
name: "postgres-${{ steps.build.outputs.VERSION }}-osx"
body: "postgres ${{ steps.build.outputs.VERSION }} osx"
artifacts: "postgres-*-osx.tar.gz,COPYRIGHT"
tag: ${{ steps.build.outputs.VERSION }}-osx
commit: ${{ github.ref_name }}
build-linux-x64:
runs-on: ubuntu-latest
steps:
- run: echo build event.tag ${{ inputs.tag }}
- name: Check out postgres code
uses: actions/checkout@v4
with:
repository: postgres/postgres
ref: refs/tags/${{ inputs.tag }}
fetch-tags: true
- run: curl https://raw.githubusercontent.com/eitco/build-postgres/${{ github.ref_name }}/build.sh > build.sh && chmod +x build.sh
- run: sudo apt-get install chrpath -y
- name: compile postgres sources and pack
id: build
run: ./build.sh "${{ inputs.tag }}" linux-x64
- uses: ncipollo/release-action@v1.14.0
with:
name: "postgres-${{ steps.build.outputs.VERSION }}-linux-x64"
body: "postgres ${{ steps.build.outputs.VERSION }} linux-x64"
artifacts: "postgres-*-linux-x64.tar.gz,COPYRIGHT"
tag: ${{ steps.build.outputs.VERSION }}-linux-x64
commit: ${{ github.ref_name }}