-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.66 KB
/
build-nightly.yml
File metadata and controls
64 lines (55 loc) · 1.66 KB
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
name: Publish Nightly Build
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
check_date:
runs-on: ubuntu-latest
permissions:
contents: read
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Print Commit Hash
run: |
git rev-parse HEAD
git rev-parse nightly
- id: should_run
name: Check if the latest nightly commit
run: if [[ $(git rev-parse HEAD) != $(git rev-parse nightly) ]]; then echo "should_run=true" >> $GITHUB_OUTPUT; fi
server:
name: Publish Nightly Server Builds
runs-on: ubuntu-latest
permissions:
contents: write
needs: check_date
if: ${{ needs.check_date.outputs.should_run == 'true' && github.ref == 'refs/heads/develop' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-env
- name: Build Packages
run: |
shipyard --config ./shipyard.json --output ./publish
- name: Delete previous release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release delete nightly --cleanup-tag --yes
sleep 10
- name: Upload Nightly Server Packages
uses: ncipollo/release-action@v1
with:
body: Nightly release of server artifacts
name: Nightly Server Release
tag: 'nightly'
makeLatest: true
prerelease: true
artifacts: './publish/*.deb,./publish/*.rpm'