Skip to content

release

release #4

Workflow file for this run

# This workflow runs on tags / releases. It also runs on nightly builds without
# publishing anything, in order to test as much of the build works as possible.
#
# We indicate whether it should publish, vs. just build, by checking if we're on
# a tag. (An alternative would be to have an input which is passed in by the
# calling workflow.)
name: release
on:
release:
types: [released]
workflow_call:
workflow_dispatch:
jobs:
build-prqlc:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- uses: ./.github/actions/build-prqlc
id: build-artifact
with:
target: ${{ matrix.target }}
profile: release
- name: Upload release artifact
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
append_body: true
files: ${{ steps.build-artifact.outputs.artifact-name }}
build-deb-package:
# TODO: currently this doesn't publish it as an artifact; would be a welcome contribution
# to add that (and eventually as a release asset)
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- name: 👷 Build prql-compiler
run: cargo build --release
- name: Copy files into .deb package
run: |
mkdir -p .debpkg/usr/bin
cp target/release/prqlc .debpkg/usr/bin/prqlc
chmod +x .debpkg/usr/bin/prqlc
- name: 📦 Build .deb package
uses: jiro4989/build-deb-action@v3
with:
package: prqlc
package_root: .debpkg
maintainer: The PRQL Project
version: ${{ github.event_name == 'release' && github.ref_name || 0 }}
desc: >
prqlc is the CLI for the PRQL compiler. It compiles PRQL to SQL, and
offers various diagnostics.
PRQL is a modern language for transforming data — a simple,
powerful, pipelined SQL replacement.
- name: Upload .deb artifact
uses: actions/upload-artifact@v3
with:
name: artifact-deb
path: ./*.deb
build-rpm-package:
# TODO: This doesn't publish the rpm yet, that would be a welcome follow-up (even as a CI artifact)
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- name: 👷 Build prqlc
run: cargo build --bin prqlc --release
- name: Copy files into .rpm package
run: |
mkdir -p .rpmpkg/usr/bin
cp target/release/prqlc .rpmpkg/usr/bin/prqlc
chmod +x .rpmpkg/usr/bin/prqlc
- name: 📦 Build .rpm package
uses: jiro4989/build-rpm-action@v2
with:
summary: CLI for PRQL, a modern language for transforming data
package: prqlc
package_root: .rpmpkg
maintainer: The PRQL Project
vendor: The PRQL Project
version: ${{ github.event_name == 'release' && github.ref_name || 0 }}
desc: >
prqlc is the CLI for the PRQL compiler. It compiles PRQL to SQL, and
offers various diagnostics.
PRQL is a modern language for transforming data — a simple,
powerful, pipelined SQL replacement.
license: Apache-2.0
- name: Upload .rpm artifact
uses: actions/upload-artifact@v3
with:
name: artifact-deb
path: |
./*.rpm
!./*-debuginfo-*.rpm
build-and-publish-snap:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- name: Move Snap to project root directory
run: cp -r packages/snap/ .
- name: 📦 Build Snap
id: build
uses: snapcore/action-build@v1
- name: Upload Snap artifact
uses: actions/upload-artifact@v3
with:
name: artifact-snap
path: ./*.snap