forked from arcbtc/LNPoS
-
Notifications
You must be signed in to change notification settings - Fork 18
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
6 changed files
with
178 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
on: | ||
schedule: | ||
- cron: '*/5 * * * *' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: arduino/report-size-deltas@v1 |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: arduino | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
build-for-esp32: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
fqbn: | ||
- esp32:esp32:esp32 | ||
# - esp32:esp32:esp32s3 | ||
# - esp32:esp32:esp32c3 | ||
# future bluetooth chips | ||
#- esp32:esp32:esp32c2 | ||
#- esp32:esp32:esp32c6 | ||
#- esp32:esp32:esp32h2 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: arduino/compile-sketches@v1 | ||
with: | ||
enable-deltas-report: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fqbn: ${{ matrix.fqbn }} | ||
platforms: | | ||
- name: esp32:esp32 | ||
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | ||
sketch-paths: | | ||
- bitcoinSwitch | ||
libraries: | | ||
- name: WebSockets | ||
- name: ArduinoJson | ||
cli-compile-flags: | | ||
- --warnings="none" | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: sketches-reports | ||
path: sketches-reports | ||
|
||
|
||
report: | ||
needs: build-for-esp32 | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step is needed to get the size data produced by the compile jobs | ||
- name: Download sketches reports artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: sketches-reports | ||
path: sketches-reports | ||
|
||
- uses: arduino/report-size-deltas@v1 | ||
with: | ||
sketches-reports-source: sketches-reports |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: update version in repo | ||
env: | ||
tag: ${{ github.ref_name }} | ||
run: | | ||
tmp=$(mktemp) | ||
jq --arg version $tag '.versions |= [$version] + .' versions.json > "$tmp" && mv "$tmp" versions.json | ||
git config --global user.name 'Alan Bits' | ||
git config --global user.email '[email protected]' | ||
git commit -am "[CHORE] update version to $tag" | ||
git push | ||
git push --delete origin $tag | ||
git tag -fa $tag -m "update via workflow" | ||
git push --tags | ||
- name: Install Arduino CLI | ||
uses: arduino/setup-arduino-cli@v1 | ||
|
||
- name: build sketch with arduino cli | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
run: | | ||
sh build.sh | ||
- name: Create github release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
run: | | ||
gh release create "$tag" --generate-notes ./build/lnPoSTdisplay.ino.bootloader.bin \ | ||
./build/lnPoSTdisplay.ino.bin ./build/lnPoSTdisplay.ino.partitions.bin |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Allows you to run this workflow from other workflows | ||
workflow_call: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- name: build webinstaller | ||
run: | | ||
sh build-webinstaller.sh | ||
cd hardware-installer | ||
npm install | ||
npx vite build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "hardware-installer/dist" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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,2 +1,3 @@ | ||
tmp | ||
.vscode | ||
.vscode | ||
build |
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