Homey GitHub Action faalt bij TypeScript, zo los je het op
De standaard github actions van homey doen blijkbaar niet helemaal wat werkt als je typescript gebruikt. Opzich geen groot probleem, dan doe ik het zelf.
Run athombv/github-action-homey-app-validate@master
npm warn exec The following package was not found and will be installed: homey@3.8.1
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated eslint@6.8.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.
✓ Pre-processing app...
Added FlowCard `measure_print_percentage` for type `triggers`
Added FlowCard `measure_temperature.bed_changed` for type `triggers`
Added FlowCard `measure_temperature.extruder_changed` for type `triggers`
Added Driver `adventurer-3-4`
Added Driver `adventurer-5m`
Added Capability `measure_print_percentage`
Added Capability `measure_temperature_bed`
Added Capability `measure_temperature_extruder`
✓ Typescript detected. Compiling...
✖ Error occurred during while running tsc
This is not the tsc command you are looking for
Dus als iemand anders hier problemen mee heeft, zo los je het op:
name: Flash Forge Homey App
on:
push:
branches:
- master
permissions:
contents: write
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Compile TypeScript
run: npx tsc
- name: Run tests
run: npm test
- name: Install Homey CLI
run: npm install -g homey typescript
- name: Validate Homey App
run: homey app validate --level publish
- name: Get last commit message
id: last_commit
run: |
echo "message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT
- name: Add new patch version with last commit message as changelog
id: update_app_version
run: |
version=$(npx homey app version patch --changelog "${{ steps.last_commit.outputs.message }}" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Commit & Push
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Update Homey App Version to v${{ steps.update_app_version.outputs.version }}"
git tag "v${{ steps.update_app_version.outputs.version }}"
git push https://x-access-token:${{ secrets.PAT_PUSH }}@github.com/arnovr/homey-flashforge.git HEAD --tags
gh release create "v${{ steps.update_app_version.outputs.version }}" -t "v${{ steps.update_app_version.outputs.version }}" --notes "" --generate-notes
env:
GH_TOKEN: ${{ secrets.PAT_PUSH }}
- name: Publish
uses: athombv/github-action-homey-app-publish@master
id: publish
with:
personal_access_token: ${{ secrets.HOMEY_PAT }}
Dit doet overigens altijd een patch versie updaten and publishen naar homey.