mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Add dry run for publishing binaries: check the compilation works
This commit is contained in:
parent
3efd06168f
commit
80b1f3e830
9
.github/workflows/publish-binaries.yml
vendored
9
.github/workflows/publish-binaries.yml
vendored
@ -1,4 +1,6 @@
|
|||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * *' # Every day at 2:00am
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
@ -8,13 +10,14 @@ jobs:
|
|||||||
check-version:
|
check-version:
|
||||||
name: Check the version validity
|
name: Check the version validity
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# No need to check the version for dry run (cron)
|
||||||
|
if: github.event_name != 'schedule'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# Check if the tag has the v<nmumber>.<number>.<number> format.
|
# Check if the tag has the v<nmumber>.<number>.<number> format.
|
||||||
# If yes, it means we are publishing an official release.
|
# If yes, it means we are publishing an official release.
|
||||||
# If no, we are releasing a RC, so no need to check the version.
|
# If no, we are releasing a RC, so no need to check the version.
|
||||||
- name: Check tag format
|
- name: Check tag format
|
||||||
if: github.event_name != 'schedule'
|
|
||||||
id: check-tag-format
|
id: check-tag-format
|
||||||
run: |
|
run: |
|
||||||
escaped_tag=$(printf "%q" ${{ github.ref_name }})
|
escaped_tag=$(printf "%q" ${{ github.ref_name }})
|
||||||
@ -54,7 +57,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --release --locked
|
run: cargo build --release --locked
|
||||||
|
# No need to upload binaries for dry run (cron)
|
||||||
- name: Upload binaries to release
|
- name: Upload binaries to release
|
||||||
|
if: github.event_name != 'schedule'
|
||||||
uses: svenstaro/upload-release-action@v1-release
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.PUBLISH_TOKEN }}
|
repo_token: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
@ -123,6 +128,8 @@ jobs:
|
|||||||
run: ls -lR ./target
|
run: ls -lR ./target
|
||||||
|
|
||||||
- name: Upload the binary to release
|
- name: Upload the binary to release
|
||||||
|
# No need to upload binaries for dry run (cron)
|
||||||
|
if: github.event_name != 'schedule'
|
||||||
uses: svenstaro/upload-release-action@v1-release
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.PUBLISH_TOKEN }}
|
repo_token: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user