-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (72 loc) · 2.57 KB
/
build-BLE_Pastable.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This is a basic workflow to help you get started with Actions
name: Build sketch BLE_Pastable1.1
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths:
- 'BLE_Pastable1.1/*.*'
- '.github/workflows/build-BLE_Pastable.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This defines a job for checking the Arduino library format specifications
# see <https://github.com/marketplace/actions/arduino-arduino-lint-action>
lint:
name: check library
runs-on: ubuntu-latest
#continue-on-error: true
steps:
- uses: actions/checkout@v4
# Arduino - lint
- name: Arduino-lint
uses: arduino/arduino-lint-action@v1
with:
library-manager: update
verbose: false
path: ./BLE_Pastable1.1
build:
name: build BLE_Pastable1.1
runs-on: ubuntu-latest
#continue-on-error: true
steps:
- uses: actions/checkout@v4
# -----------------------
- name: Compile BLE_Pastable1.1
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: arduino:mbed:nano33ble
sketch-names: "BLE_Pastable1.1.ino"
extra-arduino-cli-args: "--libraries libraries"
set-build-path: true
- name: Create artifact
run: |
mkdir release
cp BLE_Pastable1.1/build/arduino.mbed.nano33ble/BLE_Pastable1.1* release
cd release
zip -m ${{ github.ref_name }}-release.zip *.*
cp ${{ github.ref_name }}-release.zip ..
# -----------------------
- name: Create release date
id: read_release_win
shell: bash
run: |
r=$(date "+%Y%m%d-%H%M%S")
echo "::set-output name=RELEASE_BODY::$r"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: build-${{ steps.read_release_win.outputs.RELEASE_BODY }}
release_name: ${{ github.ref_name }} - Release 1.1 ${{ steps.read_release_win.outputs.RELEASE_BODY }}
- name: Upload Release Arduino
id: upload_release_asset
uses: softprops/action-gh-release@v2
with:
tag_name: build-${{ steps.read_release_win.outputs.RELEASE_BODY }}
files: |
${{ github.ref_name }}-release.zip