-
Notifications
You must be signed in to change notification settings - Fork 14
67 lines (58 loc) · 1.87 KB
/
pre_release.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: pre-release
on:
push:
branches:
- main
jobs:
pre-release:
name: Pre Release
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
submodules: true
# To fetch tags, but can this be improved using blobless checkout?
# [1]. But anyway right it is not important, and unlikely will be,
# since the repository is small.
#
# [1]: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install dependencies
run: |
pip install PyOxidizer
# nfpm
curl -sS -Lo /tmp/nfpm.deb "https://github.com/goreleaser/nfpm/releases/download/v2.25.0/nfpm_amd64.deb"
sudo dpkg -i /tmp/nfpm.deb
- name: Build
run: |
set -x
# for building cityhash for clickhouse-rs
sudo apt-get install -y musl-tools
# gcc cannot do cross compile, and there is no musl-g++ in musl-tools
sudo ln -srf /usr/bin/clang /usr/bin/musl-g++
# musl for static binaries
rustup target add x86_64-unknown-linux-musl
make packages target=x86_64-unknown-linux-musl
for postfix in .x86_64.rpm -x86_64.pkg.tar.zst _amd64.deb; do
cp chdig*$postfix chdig-latest$postfix
done
- name: Check package
run: |
sudo dpkg -i *.deb
chdig --help
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
*.deb
*.rpm
*.tar.*