-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.13 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build
on:
push:
jobs:
build:
name: Build - ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: aarch64-apple-darwin
os: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.target }}
args: "--release"
strip: true
- 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' )