Skip to content

Commit

Permalink
ci: add pre-release that we trigger every night
Browse files Browse the repository at this point in the history
  • Loading branch information
stackmystack committed May 16, 2024
1 parent 1ccb3e0 commit d21778b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- master
schedule:
- cron: '42 01 * * *'

jobs:
build:
Expand All @@ -26,6 +28,10 @@ jobs:
- name: Prepare git # To get tags from `git describe`
run: |
git fetch --prune --unshallow
- name: Update ref file for latest parsers
if: ${{ github.event_name == 'schedule' }}
run: |
./update/ref
- name: Make .deb
if: matrix.target.os == 'ubuntu-latest'
run: |
Expand All @@ -47,16 +53,20 @@ jobs:
release-fixed-assets:
needs: [build]
runs-on: ubuntu-latest
env:
DRAFT: ${{ github.event_name == 'schedule' && 'false' || 'true' }}
PRE: ${{ github.event_name == 'schedule' && 'true' || 'false' }}
steps:
- uses: actions/checkout@v2
- name: Prepare git # To get tags from `git describe`
run: git fetch --prune --unshallow
- name: Release
uses: softprops/action-gh-release@v1
- name: "Release {draft: ${{ env.DRAFT }}, pre-release: ${{ env.PRE }} }"
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }}
draft: true
draft: ${{ env.DRAFT }}
prerelease: ${{ env.PRE }}
files: ref
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d21778b

Please sign in to comment.