Skip to content

Commit 78597b2

Browse files
committed
ci: auto release
1 parent a63c507 commit 78597b2

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@ on: [push]
44

55
jobs:
66
Linux:
7-
runs-on: ubuntu-18.04
8-
steps:
9-
- uses: actions/checkout@v1
10-
with:
11-
fetch-depth: 1
12-
13-
- name: submodule
14-
run: git submodule update --init --recursive
7+
runs-on: ubuntu-latest
8+
env:
9+
targetName: ScopeMCU
1510

11+
steps:
1612
- name: Install Dependencies
1713
run: sudo apt-get install gcc-arm-none-eabi
1814

@@ -23,5 +19,26 @@ jobs:
2319
sudo mv cmake-3.15.5-Linux-x86_64 /opt/cmake-3.15.5
2420
sudo ln -sf /opt/cmake-3.15.5/bin/* /usr/local/bin/
2521
26-
- name: cmake build
27-
run: mkdir build && cd build && cmake .. && make
22+
- uses: actions/checkout@v1
23+
with:
24+
fetch-depth: 1
25+
26+
- name: Submodules
27+
run: git submodule update --init --recursive
28+
29+
- name: CMake Build
30+
run: |
31+
mkdir build && cd build
32+
cmake -DCMAKE_BUILD_TYPE=Release ..
33+
make
34+
zip ${{ env.targetName }}.zip ${{ env.targetName }}.bin ${{ env.targetName }}.hex
35+
36+
- name: Make Release
37+
if: startsWith(github.event.ref, 'refs/tags/')
38+
uses: svenstaro/upload-release-action@v1-release
39+
with:
40+
repo_token: ${{ secrets.GITHUB_TOKEN }}
41+
file: build/${{ env.targetName }}.zip
42+
asset_name: ${{ env.targetName }}.zip
43+
tag: ${{ github.ref }}
44+
overwrite: true

0 commit comments

Comments
 (0)