-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
on: [push] | ||
|
||
jobs: | ||
pre-commit: | ||
|
@@ -19,13 +18,56 @@ jobs: | |
hardware: | ||
- 'Hardware/**' | ||
- name: Ensure changelog is updated | ||
uses: dangoslen/changelog-enforcer@v2 | ||
- name: Setup python | ||
uses: dangoslen/changelog-enforcer@v3 | ||
- name: Set up python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
architecture: 'x64' | ||
- name: Show python version | ||
run: python --version | ||
- name: Install PlatformIO | ||
run: python -m pip install platformio | ||
- name: Check pre-commit hooks | ||
uses: pre-commit/[email protected] | ||
- name: Run platformio build | ||
if: steps.filter.outputs.software == 'true' | ||
uses: docker://kadaan/platformio_esp32:latest | ||
- name: Build firmware | ||
run: platformio run | ||
- name: Build filesystem | ||
run: platformio run --target buildfs | ||
- name: Create artifacts | ||
run: | | ||
7z a SmartSpin2k.zip ./dist/*.* | ||
- name: Archive | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: firmware | ||
path: .pio/build/*/SmartSpin2k.zip | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
args: --build=release | ||
name: all-artifacts | ||
|
||
- name: Get tag info | ||
id: tag_info | ||
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.tag_info.outputs.SOURCE_TAG }} | ||
name: SmartSpin2k ${{ steps.tag_info.outputs.SOURCE_TAG }} | ||
draft: false | ||
prerelease: false | ||
body: ${{ github.event.head_commit.message }} | ||
files: | | ||
SmartSpin2k-*.zip | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters