Skip to content

Create nightly build release #640

Create nightly build release

Create nightly build release #640

Workflow file for this run

name: Create nightly build release
on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"
jobs:
set-env:
runs-on: ubuntu-latest
outputs:
version: ${{ env.HQ_VERSION }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set HQ nightly version
run: |
echo "HQ_VERSION=nightly-$(date +'%Y-%m-%d')-${{ github.sha }}" >> $GITHUB_ENV
- name: Print HQ nightly version
run: |
echo "HQ version: ${{ env.HQ_VERSION }}"
build-artifacts:
needs: [set-env]
uses: ./.github/workflows/build.yml
with:
version: ${{ needs.set-env.outputs.version }}
create-tag:
runs-on: ubuntu-latest
needs: [set-env, build-artifacts]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Create tag
uses: rickstaa/action-create-tag@v1
with:
tag: nightly
force_push_tag: true
message: Nightly build ${{ needs.set-env.outputs.version }}
create-release:
runs-on: ubuntu-latest
needs: [create-tag]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Generate changelog
run: python3 scripts/extract_changelog.py DEV > generated-changelog.md
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Prepare release name
run: |
echo "RELEASE_NAME=Nightly build $(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Create release
uses: ncipollo/release-action@v1
id: create-release
with:
bodyFile: generated-changelog.md
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
name: ${{ env.RELEASE_NAME }}
prerelease: true
tag: nightly
commit: ${{ github.sha }}
artifacts: archive-*/**
removeArtifacts: true