-
Notifications
You must be signed in to change notification settings - Fork 23
67 lines (62 loc) · 1.87 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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@v3
- 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