-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (73 loc) · 2.25 KB
/
release.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
---
name: Release
on:
workflow_dispatch:
push:
tags:
- v**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: "recursive"
token: ${{ secrets.ACCESS_TOKEN }}
- name: Determine version
id: version_id
run: echo "::set-output name=value::$(git describe --always --tags --dirty)"
- name: Build firmware
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.3.1
target: esp32
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: lizard_${{ steps.version_id.outputs.value }}
tag_name: ${{ steps.version_id.outputs.value }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Zip bins and tools
run: "zip lizard.zip -@ < .github/zip_content.txt"
- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/lizard.bin
asset_name: lizard_${{ steps.version_id.outputs.value }}.bin
asset_content_type: application/octet-stream
- name: Upload devtools
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: lizard.zip
asset_name: lizard_firmware_and_devtools_${{ steps.version_id.outputs.value }}.zip
asset_content_type: application/zip
docs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: python3 -m pip install -r requirements.txt
- name: Build docs
run: mkdocs build -v
- name: Deploy gh-pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: site