mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Rework workflows and add devbuilds
This commit is contained in:
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
@@ -24,47 +24,38 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: "Read version tag"
|
||||
run: bash .github/workflow_data/commit.sh
|
||||
|
||||
- name: 'Build the firmware'
|
||||
run: |
|
||||
set -e
|
||||
for TARGET in ${TARGETS}; do
|
||||
TARGET_HW="$(echo "${TARGET}" | sed 's/f//')"; \
|
||||
./fbt TARGET_HW=$TARGET_HW updater_package
|
||||
./fbt TARGET_HW=$TARGET_HW DIST_SUFFIX=$VERSION_TAG updater_package
|
||||
done
|
||||
|
||||
- name: "Check for uncommitted changes"
|
||||
run: |
|
||||
git diff --exit-code
|
||||
|
||||
- name: 'Updater artifact'
|
||||
- name: 'Dist artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: updater
|
||||
name: dist
|
||||
path: |
|
||||
dist/${{ env.DEFAULT_TARGET }}-*/
|
||||
|
||||
# - name: 'Find Previous Comment'
|
||||
# if: ${{ github.event.pull_request }}
|
||||
# uses: peter-evans/find-comment@v1
|
||||
# id: fc
|
||||
# with:
|
||||
# issue-number: ${{ github.event.pull_request.number }}
|
||||
# comment-author: 'github-actions[bot]'
|
||||
# body-includes: 'Compiled firmware:'
|
||||
- name: "Make tgz, zip and sdk"
|
||||
run: bash .github/workflow_data/package.sh
|
||||
|
||||
# - name: Artifact info
|
||||
# id: artifact-info
|
||||
# uses: dawidd6/action-download-artifact@v2
|
||||
# with:
|
||||
# dry_run: true
|
||||
|
||||
# - name: 'Create or update comment'
|
||||
# if: ${{ github.event.pull_request}}
|
||||
# uses: peter-evans/create-or-update-comment@v1
|
||||
# with:
|
||||
# comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
# issue-number: ${{ github.event.pull_request.number }}
|
||||
# body: |
|
||||
# **Compiled firmware:**
|
||||
# - [📦 Update package](${{steps.artifact-info.outputs.artifacts[0].archive_download_url}})
|
||||
# edit-mode: replace
|
||||
- name: Send devbuild webhook
|
||||
if: "github.event_name == 'push' && endsWith(github.event.push.ref, '/dev')"
|
||||
env:
|
||||
NC_HOST: "https://cloud.cynthialabs.net/"
|
||||
NC_USER: "${{ secrets.NC_USER }}"
|
||||
NC_PASS: "${{ secrets.NC_PASS }}"
|
||||
BUILD_WEBHOOK: ${{ secrets.BUILD_WEBHOOK }}
|
||||
run: |
|
||||
python -m pip install pyncclient
|
||||
python .github/workflow_data/devbuild.py
|
||||
|
||||
8
.github/workflows/hotfix.yml
vendored
8
.github/workflows/hotfix.yml
vendored
@@ -31,21 +31,21 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: "Read version tag"
|
||||
run: bash .github/workflow_data/version.sh
|
||||
|
||||
- name: 'Build the firmware'
|
||||
run: |
|
||||
set -e
|
||||
for TARGET in ${TARGETS}; do
|
||||
TARGET_HW="$(echo "${TARGET}" | sed 's/f//')"; \
|
||||
./fbt TARGET_HW=$TARGET_HW FORCE_NO_DIRTY=1 updater_package
|
||||
./fbt TARGET_HW=$TARGET_HW DIST_SUFFIX=$VERSION_TAG FORCE_NO_DIRTY=1 updater_package
|
||||
done
|
||||
|
||||
- name: "Check for uncommitted changes"
|
||||
run: |
|
||||
git diff --exit-code
|
||||
|
||||
- name: "Read version tag"
|
||||
run: bash .github/workflow_data/version.sh
|
||||
|
||||
- name: "Make tgz, zip and sdk"
|
||||
run: bash .github/workflow_data/package.sh
|
||||
|
||||
|
||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
release:
|
||||
if: |
|
||||
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
|
||||
endsWith(github.event.pull_request.title, ' Release Candidate Changes') &&
|
||||
endsWith(github.event.pull_request.title, ' Release') &&
|
||||
github.event.review.author_association == 'OWNER' &&
|
||||
startsWith(github.event.pull_request.title, 'V') &&
|
||||
github.event.pull_request.base.ref == 'main' &&
|
||||
@@ -31,21 +31,21 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: "Read version tag"
|
||||
run: bash .github/workflow_data/version.sh
|
||||
|
||||
- name: 'Build the firmware'
|
||||
run: |
|
||||
set -e
|
||||
for TARGET in ${TARGETS}; do
|
||||
TARGET_HW="$(echo "${TARGET}" | sed 's/f//')"; \
|
||||
./fbt TARGET_HW=$TARGET_HW FORCE_NO_DIRTY=1 updater_package
|
||||
./fbt TARGET_HW=$TARGET_HW DIST_SUFFIX=$VERSION_TAG FORCE_NO_DIRTY=1 updater_package
|
||||
done
|
||||
|
||||
- name: "Check for uncommitted changes"
|
||||
run: |
|
||||
git diff --exit-code
|
||||
|
||||
- name: "Read version tag"
|
||||
run: bash .github/workflow_data/version.sh
|
||||
|
||||
- name: "Make tgz, zip and sdk"
|
||||
run: bash .github/workflow_data/package.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user