mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-17 05:00:26 +00:00
Add nightly release (#1212)
This commit is contained in:
parent
f6f7cfb5e5
commit
a3a058831d
1 changed files with 32 additions and 0 deletions
32
.github/workflows/nightly.yml
vendored
Normal file
32
.github/workflows/nightly.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Nightly
|
||||
on:
|
||||
schedule:
|
||||
- cron: '45 8 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_name:
|
||||
description: 'Tag name to trigger the release'
|
||||
required: false
|
||||
default: 'nightly'
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.NIGHTLY_BUILD_TOKEN }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
gh release create ${{ github.event.inputs.tag_name }} --title ${{ github.event.inputs.tag_name }} --generate-notes --prerelease
|
||||
|
||||
- if: ${{ github.event_name == 'schedule' }}
|
||||
run: |
|
||||
if [[ $(git diff nightly --name-only -B -M -C) ]]; then
|
||||
gh release delete nightly --yes --cleanup-tag || true
|
||||
gh release create nightly --title nightly --generate-notes --prerelease
|
||||
fi
|
||||
Loading…
Reference in a new issue