Skip to content

Commit

Permalink
chore: nightly token that can trigger the release workflow (#303)
Browse files Browse the repository at this point in the history
* chore: allow tag to have a v-prefix

Signed-off-by: Keming <[email protected]>

* debug output

Signed-off-by: Keming <[email protected]>

* set job output

Signed-off-by: Keming <[email protected]>

* fix needs

Signed-off-by: Keming <[email protected]>

* fix nightly token

Signed-off-by: Keming <[email protected]>

---------

Signed-off-by: Keming <[email protected]>
  • Loading branch information
kemingy authored Jan 24, 2024
1 parent 3b06670 commit 7db1816
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ on:
- cron: "0 16 * * *"
workflow_dispatch:

permissions:
actions: write

jobs:
setup:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.NIGHTLY_TOKEN }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- run: |
commit_date=$(git log -1 --since="24 hours ago" --pretty=format:"%cI")
if [[ -n "$commit_date" ]]; then
if $(gh release view nightly); then
gh release edit 0.0.0-nightly --target main
if $(gh release view v0.0.0-nightly); then
gh release edit v0.0.0-nightly --target main
else
gh release create 0.0.0-nightly --generate-notes --prerelease
gh release create v0.0.0-nightly --generate-notes --prerelease
fi
fi
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 7db1816

Please sign in to comment.