Skip to content

[bug]:fix sa.node lock issue #103

[bug]:fix sa.node lock issue

[bug]:fix sa.node lock issue #103

Workflow file for this run

name: Build
on:
push:
tags:
- 'v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Build job
build:
runs-on: windows-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Set Version
id: version
shell: pwsh
run: |
$version = $env:GITHUB_REF_NAME -replace '^v',''
echo "VERSION=$version" >> $env:GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Install dependencies
run: npm install
- name: Build with VitePress
run: npm run docs:build
- name: Build docan
run: npm run docan
- name: Build worker
run: npm run worker
- name: Build api
run: npm run api
- name: Build APP
run: npm run build:win
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: ./docs/dev/releases_note.md
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dist/EcuBus-Pro ${{ env.VERSION }}.exe
asset_name: EcuBus-Pro ${{ env.VERSION }}.exe
asset_content_type: application/vnd.microsoft.portable-executable
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: zip
directory: ./dist/win-unpacked
filename: Portable EcuBus-Pro ${{ env.VERSION }}.zip
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/win-unpacked/Portable EcuBus-Pro ${{ env.VERSION }}.zip
asset_name: Portable EcuBus-Pro ${{ env.VERSION }}.zip
asset_content_type: application/zip
- name: Upload to aliyun
env:
ALIYUN_ACCESS_KEY_ID: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
ALIYUN_ACCESS_KEY_SECRET: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
run: node tools/upload.js --note --app