Skip to content

feat: 测试 yml

feat: 测试 yml #10

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-release:
name: Build Project and Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/[email protected]
- name: Node
uses: actions/[email protected]
with:
node-version: "20.19.6"
- name: Install
run: npm run install
- name: Build frontend
run: npm run build:frontend
- name: Get version
id: read_version
run: |
VERSION=$(jq -r '.version' package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Update version in manifest file
run: |
sed -i "s/version=0.0.1/version=${{ steps.read_version.outputs.version }}/" app/manifest
- name: Get changelog
id: read_log
run: |
CHANGELOG=$(jq -r '.changelog' package.json)
echo "changelog=$CHANGELOG" >> $GITHUB_OUTPUT
- name: Update changelog in manifest file
run: |
sed -i "s|changelog=changelog|changelog=${{ steps.read_log.outputs.changelog }}|" app/manifest
- name: Build x86 backend
run: npm run build:backend
- name: Update x86 platform in manifest file
run: |
sed -i "s|platform=platform|platform=x86|" app/manifest
- name: Build x86 package
run: |
chmod +x ./build/fnpack-1.0.4-linux-amd64
./build/fnpack-1.0.4-linux-amd64 build app
- name: Build x86 package
run: mv code.editor.fpk code.editor.x86.fpk
- name: Show files
run: ls
# - name: Release
# uses: ncipollo/[email protected]
# with:
# tag: v${{ steps.read_version.outputs.version}}
# name: v${{ steps.read_version.outputs.version}}
# body: |
# [更新日志](https://github.com/FNOSP/App.Bin.CodeEditor/blob/main/CHANGELOG.md)
# artifacts: "code.editor.fpk"
# token: ${{ secrets.GITHUB_TOKEN }}