Fix publish release CI

This commit is contained in:
curquiza 2022-11-22 11:38:45 +01:00
parent a07e1f7a00
commit 415977a41e

View File

@ -18,7 +18,7 @@ jobs:
# 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' if: github.event_name == 'release'
id: check-tag-format id: check-tag-format
run: | run: |
escaped_tag=$(printf "%q" ${{ github.ref_name }}) escaped_tag=$(printf "%q" ${{ github.ref_name }})
@ -29,7 +29,7 @@ jobs:
echo ::set-output name=stable::false echo ::set-output name=stable::false
fi fi
- name: Check release validity - name: Check release validity
if: github.event_name != 'schedule' && steps.check-tag-format.outputs.stable == 'true' if: github.event_name == 'release' && steps.check-tag-format.outputs.stable == 'true'
run: bash .github/scripts/check-release.sh run: bash .github/scripts/check-release.sh
publish: publish:
@ -60,7 +60,7 @@ jobs:
run: cargo build --release --locked run: cargo build --release --locked
# No need to upload binaries for dry run (cron) # No need to upload binaries for dry run (cron)
- name: Upload binaries to release - name: Upload binaries to release
if: github.event_name != 'schedule' if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v1-release uses: svenstaro/upload-release-action@v1-release
with: with:
repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} repo_token: ${{ secrets.MEILI_BOT_GH_PAT }}
@ -98,7 +98,7 @@ jobs:
args: --release --target ${{ matrix.target }} args: --release --target ${{ matrix.target }}
- name: Upload the binary to release - name: Upload the binary to release
# No need to upload binaries for dry run (cron) # No need to upload binaries for dry run (cron)
if: github.event_name != 'schedule' if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v1-release uses: svenstaro/upload-release-action@v1-release
with: with:
repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} repo_token: ${{ secrets.MEILI_BOT_GH_PAT }}
@ -168,7 +168,7 @@ jobs:
- name: Upload the binary to release - name: Upload the binary to release
# No need to upload binaries for dry run (cron) # No need to upload binaries for dry run (cron)
if: github.event_name != 'schedule' if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v1-release uses: svenstaro/upload-release-action@v1-release
with: with:
repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} repo_token: ${{ secrets.MEILI_BOT_GH_PAT }}