Skip to content

Commit 803cc55

Browse files
committed
Move Azure pipelines to Github Actions
1 parent 95a0018 commit 803cc55

File tree

5 files changed

+142
-157
lines changed

5 files changed

+142
-157
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Builds Betaflight Blackbox Explorer on Windows, Linux and macOS platforms.
2+
#
3+
# After building, artifacts are released to a separate repository.
4+
5+
env:
6+
debugBuild: true
7+
8+
name: CI
9+
10+
on: workflow_call
11+
12+
jobs:
13+
build:
14+
name: Build (${{ matrix.name }})
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
include:
19+
- name: Linux
20+
os: ubuntu-20.04
21+
releaseArgs: --linux64
22+
23+
- name: macOS
24+
os: macos-11
25+
releaseArgs: --osx64
26+
27+
- name: Windows
28+
os: windows-2022
29+
releaseArgs: --win64
30+
steps:
31+
- uses: actions/checkout@v2
32+
33+
- name: Cache NW.js
34+
uses: actions/cache@v2
35+
with:
36+
path: cache/
37+
key: ${{ runner.os }}-${{ hashFiles('gulpfile.js') }}
38+
39+
- name: Install Node.js
40+
uses: actions/setup-node@v2
41+
with:
42+
node-version-file: '.nvmrc'
43+
cache: yarn
44+
45+
- run: yarn install --immutable --immutable-cache --check-cache
46+
47+
- run: yarn gulp release ${{ matrix.releaseArgs }}
48+
if: ${{ !env.debugBuild }}
49+
50+
- run: yarn gulp debug-release ${{ matrix.releaseArgs }}
51+
if: ${{ env.debugBuild }}
52+
53+
- name: Publish build artifacts
54+
uses: actions/upload-artifact@v2
55+
with:
56+
name: Betaflight-Blackbox-Explorer${{ env.debugBuild == 'true' && '-Debug' || '' }}-${{ matrix.name }}
57+
path: release/
58+
retention-days: 90

.github/workflows/nightly.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# You'll need to setup the follwing environment variables:
2+
# env.repoNightly - The repository to release nightly builds to e.g. betaflight-configurator-nightly
3+
# env.releaseNotes - The release notes to be published as part of the github release
4+
# env.debugReleaseNotes - The release notes to be published as part of the github debug release
5+
# secrets.REPO_TOKEN - A GitHub token with permissions to push and publish releases to the nightly repo
6+
7+
env:
8+
repoNightly: betaflight/blackbox-log-viewer-nightlies
9+
debugReleaseNotes: >
10+
This is an automated development build.
11+
It may be unstable and result in corrupted configurations or data loss.
12+
**Use only for testing.**
13+
releaseNotes: This is a release build. It does not contain the debug console.
14+
15+
name: Nightly
16+
17+
on:
18+
push:
19+
branches:
20+
- master
21+
- '*-maintenance'
22+
23+
jobs:
24+
ci:
25+
name: CI
26+
uses: ./.github/workflows/ci.yml
27+
28+
release:
29+
name: Release
30+
needs: ci
31+
runs-on: ubuntu-20.04
32+
steps:
33+
- name: Fetch build artifacts
34+
uses: actions/download-artifact@v2
35+
with:
36+
path: release-assets/
37+
38+
- name: Select release notes
39+
id: notes
40+
run: |
41+
set -- release-assets/Betaflight-Blackbox-Explorer-Debug-*
42+
echo "::set-output name=notes::$(test -e "$1" && echo '${{ env.debugReleaseNotes }}' || echo '${{ env.releaseNotes }}')"
43+
44+
- name: Get current date
45+
id: date
46+
run: echo "::set-output name=today::$(date '+%Y%m%d')"
47+
48+
- name: Release
49+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
50+
with:
51+
token: ${{ secrets.REPO_TOKEN }}
52+
repository: ${{ env.repoNightly }}
53+
tag_name: v${{ steps.date.outputs.today }}.${{ github.run_number }}
54+
files: release-assets/Betaflight-Blackbox-Explorer-*/**
55+
draft: false
56+
prerelease: false
57+
fail_on_unmatched_files: true
58+
body: |
59+
${{ steps.notes.outputs.notes }}
60+
61+
### Repository:
62+
${{ github.repository }} ([link](${{ github.event.repository.html_url }}))
63+
64+
### Branch:
65+
${{ github.ref_name }} ([link](${{ github.event.repository.html_url }}/tree/${{ github.ref_name }}))
66+
67+
### Latest changeset:
68+
${{ github.event.head_commit.id }} ([link](${{ github.event.head_commit.url }}))
69+
70+
### Changes:
71+
${{ github.event.head_commit.message }}

.github/workflows/pr.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- '*-maintenance'
8+
9+
jobs:
10+
ci:
11+
name: CI
12+
uses: ./.github/workflows/ci.yml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Betaflight Blackbox Explorer
22

3-
[![Latest version](https://img.shields.io/github/v/release/betaflight/blackbox-log-viewer)](https://github.com/betaflight/blackbox-log-viewer/releases) [![Build Status](https://travis-ci.com/betaflight/blackbox-log-viewer.svg?branch=master)](https://travis-ci.com/betaflight/blackbox-log-viewer) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=betaflight_blackbox-log-viewer&metric=alert_status)](https://sonarcloud.io/dashboard?id=betaflight_blackbox-log-viewer) [![Build Status](https://dev.azure.com/Betaflight/Betaflight%20Nightlies/_apis/build/status/betaflight.blackbox-log-viewer?branchName=master)](https://dev.azure.com/Betaflight/Betaflight%20Nightlies/_build/latest?definitionId=2&branchName=master) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
3+
[![Latest version](https://img.shields.io/github/v/release/betaflight/blackbox-log-viewer)](https://github.com/betaflight/blackbox-log-viewer/releases) [![Build](https://img.shields.io/github/workflow/status/betaflight/blackbox-log-viewer/Nightly)](https://github.com/betaflight/blackbox-log-viewer/actions/workflows/nightly.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=betaflight_blackbox-log-viewer&metric=alert_status)](https://sonarcloud.io/dashboard?id=betaflight_blackbox-log-viewer) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
44

55
![Main explorer interface](screenshots/main-interface.jpg)
66

azure-pipelines.yml

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)