Skip to content

Commit b42e495

Browse files
authored
Merge pull request #440 from blckmn/build-process
Moving to github actions, to attach on release.
2 parents dae0d91 + ad05380 commit b42e495

File tree

4 files changed

+89
-82
lines changed

4 files changed

+89
-82
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
ci:
9+
name: CI
10+
uses: ./.github/workflows/ci.yml
11+
with:
12+
release_build: true
13+
14+
release:
15+
name: Release
16+
needs: ci
17+
runs-on: ubuntu-20.04
18+
steps:
19+
- name: Code Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Fetch build artifacts
23+
uses: actions/download-artifact@v2
24+
25+
- name: List assets
26+
run: ls -al Assets
27+
28+
- name: Attach assets to release
29+
run: |
30+
set -x
31+
assets=()
32+
for asset in Assets/*.zip; do
33+
assets+=("-a" "$asset")
34+
echo "$asset"
35+
done
36+
tag_name="${GITHUB_REF##*/}"
37+
hub release edit "${assets[@]}" -m "" "$tag_name"
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Builds Betaflight Lua Scripts.
2+
#
3+
# After building, artifacts are kept for 7 days.
4+
5+
name: CI
6+
7+
on:
8+
workflow_call:
9+
inputs:
10+
release_build:
11+
description: 'Specifies if it is a debug build or a release build'
12+
default: false
13+
required: false
14+
type: boolean
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-20.04
20+
steps:
21+
- name: Code Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Install Lua
25+
run: sudo apt-get -y install lua5.2
26+
27+
- name: Install Zip
28+
run: sudo apt-get -y install zip
29+
30+
- name: Execute Build
31+
run: make release
32+
33+
- name: Publish build artifacts
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: Assets
37+
path: ./release/*.zip
38+
retention-days: 7

.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

azure-pipelines.yml

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

0 commit comments

Comments
 (0)