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