2023-03-07 21:55:09 +08:00
|
|
|
name: Publish to APT & Homebrew
|
2019-12-04 21:32:18 +08:00
|
|
|
|
|
|
|
on:
|
2020-05-06 05:33:39 +08:00
|
|
|
release:
|
2023-01-11 17:30:18 +08:00
|
|
|
types: [released]
|
2019-12-04 21:32:18 +08:00
|
|
|
|
|
|
|
jobs:
|
2022-06-17 01:27:27 +08:00
|
|
|
check-version:
|
|
|
|
name: Check the version validity
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-09-02 22:45:32 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-17 01:27:27 +08:00
|
|
|
- name: Check release validity
|
2022-06-24 01:14:39 +08:00
|
|
|
run: bash .github/scripts/check-release.sh
|
2022-06-17 01:27:27 +08:00
|
|
|
|
2020-03-20 19:14:08 +08:00
|
|
|
debian:
|
2019-12-04 21:32:18 +08:00
|
|
|
name: Publish debian packagge
|
2022-12-20 01:35:33 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-06-17 01:27:27 +08:00
|
|
|
needs: check-version
|
2022-12-20 01:35:33 +08:00
|
|
|
container:
|
2024-07-09 00:33:00 +08:00
|
|
|
# Use ubuntu-20.04 to compile with glibc 2.28
|
|
|
|
image: ubuntu:20.04
|
2019-12-04 21:32:18 +08:00
|
|
|
steps:
|
2022-12-20 01:35:33 +08:00
|
|
|
- name: Install needed dependencies
|
|
|
|
run: |
|
|
|
|
apt-get update && apt-get install -y curl
|
|
|
|
apt-get install build-essential -y
|
2024-07-29 16:00:40 +08:00
|
|
|
- uses: dtolnay/rust-toolchain@v1.70
|
2019-12-04 21:32:18 +08:00
|
|
|
- name: Install cargo-deb
|
|
|
|
run: cargo install cargo-deb
|
2022-06-29 04:21:41 +08:00
|
|
|
- uses: actions/checkout@v3
|
2019-12-04 21:32:18 +08:00
|
|
|
- name: Build deb package
|
2022-12-07 23:20:47 +08:00
|
|
|
run: cargo deb -p meilisearch -o target/debian/meilisearch.deb
|
2019-12-04 21:32:18 +08:00
|
|
|
- name: Upload debian pkg to release
|
2023-08-02 01:22:37 +08:00
|
|
|
uses: svenstaro/upload-release-action@2.7.0
|
2019-12-04 21:32:18 +08:00
|
|
|
with:
|
2022-09-04 17:32:22 +08:00
|
|
|
repo_token: ${{ secrets.MEILI_BOT_GH_PAT }}
|
2019-12-04 21:32:18 +08:00
|
|
|
file: target/debian/meilisearch.deb
|
|
|
|
asset_name: meilisearch.deb
|
|
|
|
tag: ${{ github.ref }}
|
2019-12-05 21:02:36 +08:00
|
|
|
- name: Upload debian pkg to apt repository
|
|
|
|
run: curl -F package=@target/debian/meilisearch.deb https://${{ secrets.GEMFURY_PUSH_TOKEN }}@push.fury.io/meilisearch/
|
2020-03-20 19:14:08 +08:00
|
|
|
|
|
|
|
homebrew:
|
|
|
|
name: Bump Homebrew formula
|
2022-12-02 01:23:29 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-06-17 01:27:27 +08:00
|
|
|
needs: check-version
|
2020-03-20 19:14:08 +08:00
|
|
|
steps:
|
2020-05-06 05:33:39 +08:00
|
|
|
- name: Create PR to Homebrew
|
2023-11-02 01:57:30 +08:00
|
|
|
uses: mislav/bump-homebrew-formula-action@v3
|
2020-03-20 19:14:08 +08:00
|
|
|
with:
|
|
|
|
formula-name: meilisearch
|
2023-08-24 17:24:47 +08:00
|
|
|
formula-path: Formula/m/meilisearch.rb
|
2020-03-20 19:14:08 +08:00
|
|
|
env:
|
|
|
|
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_COMMITTER_TOKEN }}
|