Welcome to mirror list, hosted at ThFree Co, Russian Federation.

nightly.yml « workflows « .github - github.com/betaflight/betaflight-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d9bbc47bc0220e04c6a732e970c22d26dea34e29 (plain)
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
68
69
70
71
72
73
# You'll need to setup the follwing environment variables:
#   env.repo_nightly - The repository to release nightly builds to e.g. betaflight-configurator-nightly
#   env.release_notes - The release notes to be published as part of the github release
#   env.debug_release_notes - The release notes to be published as part of the github debug release
#   secrets.REPO_TOKEN - A GitHub token with permissions to push and publish releases to the nightly repo

env:
  repo_nightly: betaflight/betaflight-configurator-nightlies
  debug_release_notes: >
    This is an automated development build.
    It may be unstable and result in corrupted configurations or data loss.
    **Use only for testing.**
  release_notes: This is a debug build. It contains the debug console.

name: Nightly

on:
  push:
    branches:
      - master
      - '*-maintenance'

jobs:
  ci:
    name: CI
    uses: ./.github/workflows/ci.yml
    with:
      debug_build: true

  release:
    name: Nightly release
    needs: ci
    runs-on: ubuntu-22.04
    steps:
      - name: Fetch build artifacts
        uses: actions/download-artifact@v3
        with:
          path: release-assets/

      - name: Select release notes
        id: notes
        run: |
          set -- release-assets/Betaflight-Configurator-Debug-*
          echo "::set-output name=notes::$(test -e "$1" && echo '${{ env.debug_release_notes }}' || echo '${{ env.release_notes }}')"

      - name: Get current date
        id: date
        run: echo "::set-output name=today::$(date '+%Y%m%d')"

      - name: Release
        uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
        with:
          token: ${{ secrets.REPO_TOKEN }}
          repository: ${{ env.repo_nightly }}
          tag_name: v${{ steps.date.outputs.today }}.${{ github.run_number }}
          files: release-assets/Betaflight-Configurator-*/**
          draft: false
          prerelease: false
          fail_on_unmatched_files: true
          body: |
            ${{ steps.notes.outputs.notes }}

            ### Repository:
            ${{ github.repository }} ([link](${{ github.event.repository.html_url }}))

            ### Branch:
            ${{ github.ref_name }} ([link](${{ github.event.repository.html_url }}/tree/${{ github.ref_name }}))

            ### Latest changeset:
            ${{ github.event.head_commit.id }} ([link](${{ github.event.head_commit.url }}))

            ### Changes:
            ${{ github.event.head_commit.message }}