Skip to content

Push

Push #27

Workflow file for this run

name: Push
on:
push:
jobs:
build:
name: Build - ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
# To publish the releases
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform:
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
command: both
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04
command: build
- target: aarch64-apple-darwin
os: macos-14
command: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start PG for the tests
run: docker compose up -d
if: ${{ matrix.platform.command == 'both' }}
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.target }}
args: "--release"
strip: true
command: ${{ matrix.platform.command }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: pgextract-${{ matrix.platform.target }}
path: target/${{ matrix.platform.target }}/release/pgextract
- run: cp target/${{ matrix.platform.target }}/release/pgextract pgextract-${{ matrix.platform.target }}
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "pgextract-*"
body_path: CHANGELOG.md
if: startsWith( github.ref, 'refs/tags/v' )