Skip to content

Commit 950f069

Browse files
committed
HyperSerialPico first version
0 parents  commit 950f069

File tree

18 files changed

+2533
-0
lines changed

18 files changed

+2533
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: awawa-dev

.github/workflows/push-master.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: HyperSerialPico CI Build
2+
3+
on: [push]
4+
5+
jobs:
6+
7+
###########################
8+
#### HyperSerialPico ######
9+
###########################
10+
11+
HyperSerialPico:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
18+
19+
- name: Install GNU Arm Embedded Toolchain
20+
uses: carlosperate/arm-none-eabi-gcc-action@v1
21+
with:
22+
release: '12.2.Rel1'
23+
24+
- name: Build packages
25+
shell: bash
26+
run: |
27+
mkdir build
28+
cd build
29+
cmake ..
30+
cmake --build . --config Release
31+
32+
- uses: actions/upload-artifact@v3
33+
name: Upload artifacts (commit)
34+
if: (startsWith(github.event.ref, 'refs/tags') != true)
35+
with:
36+
path: |
37+
firmwares/*.uf2
38+
39+
- uses: actions/upload-artifact@v3
40+
name: Upload artifacts (release)
41+
if: startsWith(github.ref, 'refs/tags/')
42+
with:
43+
name: firmware-release
44+
path: |
45+
firmwares/*.uf2
46+
47+
################################
48+
###### Publish Releases ########
49+
################################
50+
51+
publish:
52+
name: Publish Releases
53+
if: startsWith(github.event.ref, 'refs/tags')
54+
needs: [HyperSerialPico]
55+
runs-on: ubuntu-latest
56+
permissions:
57+
contents: write
58+
steps:
59+
# generate environment variables
60+
- name: Generate environment variables from version and tag
61+
run: |
62+
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
63+
echo "preRelease=false" >> $GITHUB_ENV
64+
65+
# If version contains alpha or beta, mark draft release as pre-release
66+
- name: Mark release as pre-release
67+
if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta')
68+
run: echo "preRelease=true" >> $GITHUB_ENV
69+
70+
- uses: actions/download-artifact@v3
71+
with:
72+
name: firmware-release
73+
74+
# create draft release and upload artifacts
75+
- name: Create draft release
76+
uses: softprops/action-gh-release@v1
77+
with:
78+
name: HyperSerialPico ${{ env.VERSION }}
79+
tag_name: ${{ env.TAG }}
80+
files: |
81+
*.uf2
82+
draft: true
83+
prerelease: ${{ env.preRelease }}
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)