mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
New build system
This commit is contained in:
83
.github/workflows/release.yml
vendored
83
.github/workflows/release.yml
vendored
@@ -1,83 +0,0 @@
|
||||
name: 'Release'
|
||||
|
||||
on:
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
env:
|
||||
TARGETS: f7
|
||||
DEFAULT_TARGET: f7
|
||||
|
||||
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') &&
|
||||
github.event.review.author_association == 'MEMBER' &&
|
||||
startsWith(github.event.pull_request.title, 'V') &&
|
||||
github.event.pull_request.base.ref == 'main' &&
|
||||
github.event.pull_request.head.ref == 'dev' &&
|
||||
github.event.pull_request.state == 'open' &&
|
||||
github.event.pull_request.draft == false &&
|
||||
github.event.review.state == 'APPROVED'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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 DIST_SUFFIX=$VERSION_TAG updater_package
|
||||
done
|
||||
|
||||
- name: "Check for uncommitted changes"
|
||||
run: |
|
||||
git diff --exit-code
|
||||
|
||||
- name: "Make tgz, zip and sdk"
|
||||
run: bash .github/workflow_data/package.sh
|
||||
|
||||
- name: "Update release notes"
|
||||
run: python .github/workflow_data/release.py
|
||||
|
||||
- name: "Upload to webupdater"
|
||||
env:
|
||||
NC_HOST: "https://cloud.cynthialabs.net/"
|
||||
NC_USERAGENT: "${{ secrets.NC_USERAGENT }}"
|
||||
NC_USER: "${{ secrets.NC_USER }}"
|
||||
NC_PASS: "${{ secrets.NC_PASS }}"
|
||||
run: |
|
||||
python -m pip install pyncclient
|
||||
python .github/workflow_data/webupdater.py
|
||||
|
||||
- name: "Merge pull request"
|
||||
uses: "pascalgn/automerge-action@v0.15.6"
|
||||
env:
|
||||
MERGE_LABELS: ""
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- name: "Make release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
body_path: ".github/workflow_data/release.md"
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: |
|
||||
${{ env.ARTIFACT_TGZ }}
|
||||
${{ env.ARTIFACT_ZIP }}
|
||||
${{ env.ARTIFACT_SDK }}
|
||||
name: "${{ env.VERSION_TAG }}"
|
||||
tag_name: "${{ env.VERSION_TAG }}"
|
||||
target_commitish: ${{ github.event.pull_request.base.ref }}
|
||||
Reference in New Issue
Block a user