-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (54 loc) · 1.94 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (54 loc) · 1.94 KB
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
name: Release
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
env:
BUILD_TYPE: Release
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install ARM toolchain and dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi libfreetype-dev ninja-build
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0.1'
- name: Install Ruby gems
run: gem install rake freetype
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build firmware
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel
- name: Build dictionary UF2
run: rake uf2
working-directory: vendor/harucom-os-dict
- name: Merge firmware and dictionary UF2
run: |
ruby scripts/merge_uf2.rb \
-o build/harucom_os_full.uf2 \
build/harucom_os.uf2 \
vendor/harucom-os-dict/build/dict.uf2
- name: Package release archives
run: |
mkdir -p release staging
cp build/harucom_os_full.uf2 staging/harucom_os_full-${{ github.ref_name }}.uf2
cp build/harucom_os.uf2 staging/harucom_os-${{ github.ref_name }}.uf2
(cd staging && zip ../release/harucom_os-${{ github.ref_name }}.zip *.uf2)
(cd staging && tar czf ../release/harucom_os-${{ github.ref_name }}.tar.gz *.uf2)
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: release/*
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-') }}