-
-
Notifications
You must be signed in to change notification settings - Fork 46
53 lines (43 loc) · 1.27 KB
/
release.yml
File metadata and controls
53 lines (43 loc) · 1.27 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
name: Release Build
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from tag
id: get_version
run: |
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO
run: pip install --upgrade platformio
- name: Build
run: pio run
- name: Prepare release artifacts
run: |
mkdir -p release
cp .pio/build/AntiHunter-full/firmware.bin release/antihunter-full-${{ steps.get_version.outputs.version }}.bin
cp .pio/build/AntiHunter-headless/firmware.bin release/antihunter-headless-${{ steps.get_version.outputs.version }}.bin
cp Dist/bootloader.bin release/
cp Dist/partitions.bin release/
cp Dist/flashAntihunter.sh release/
- name: Generate checksums
run: |
cd release
sha256sum *.bin flashAntihunter.sh > SHA256SUMS.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: release/*
prerelease: true