Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prettier, with workflow on GitHub #866

Merged
merged 9 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 16 additions & 18 deletions .github/workflows/build-windows-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
- uses: actions/checkout@v3
with:
ref: develop

- name: Setup Nodejs version
uses: actions/setup-node@v3
with:
node-version: '21.1.0'

- name: Install npm dependencies
run: npm install --legacy-peer-deps
run: npm install --legacy-peer-deps

# It is necesarry to install wine for building the package for
# windows. Also it is necesary to download the wine-mono windows
# installer and install it with wine
Expand All @@ -37,7 +37,7 @@ jobs:
wget https://dl.winehq.org/wine/wine-mono/5.0.0/wine-mono-5.0.0-x86.msi
export DISPLAY=:0.0
wine msiexec /i wine-mono-5.0.0-x86.msi

- name: Build Microsoft Windows package
run: |
export DISPLAY=:0.0
Expand All @@ -52,7 +52,7 @@ jobs:
run: |
version=$(jq -r '.version' package.json)
echo "icestudio_version=${version}" >> $GITHUB_OUTPUT

# Timestamp for the build
- id: build_date
run: |
Expand All @@ -64,25 +64,23 @@ jobs:
run: |
content=`tr '\n' ' ' < app/buildinfo.json`
echo "buildJson=${content}" >> $GITHUB_OUTPUT

- name: 'Upload MSI/win64'
env:
ICESTUDIO_VERSION: "${{steps.icestudio_json.outputs.icestudio_version}}"
TIMESTAMP: "${{steps.build_date.outputs.icestudio_timestamp}}"
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
uses: 'actions/upload-artifact@v4'
with:
name: "win64_MSI_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.exe"
name: 'win64_MSI_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.exe'
if-no-files-found: error

- name: 'Upload ZIP/win64'
env:
ICESTUDIO_VERSION: "${{steps.icestudio_json.outputs.icestudio_version}}"
TIMESTAMP: "${{steps.build_date.outputs.icestudio_timestamp}}"
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
uses: 'actions/upload-artifact@v4'
with:
name: "win64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.zip"
name: 'win64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.zip'
if-no-files-found: error


33 changes: 15 additions & 18 deletions .github/workflows/main-aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Icestudio for ARM 64'

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ develop ]
branches: [develop]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -20,10 +20,9 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checkout the develop branch
- uses: actions/checkout@v3

# Check commit message for keyword RUN_BUILD
- name: Check commit message for RUN_BUILD
id: commit_message_check
Expand All @@ -35,22 +34,20 @@ jobs:
echo "skip_build=true" >> $GITHUB_ENV
fi



- name: Setup por arm64
if: env.skip_build != 'true'
run: ./scripts/preInstallArm64.sh
run: ./scripts/preInstallArm64.sh

- name: Setup Nodejs version
if: env.skip_build != 'true'
uses: actions/setup-node@v3
with:
node-version: '19.3.0'

- name: Install npm dependencies
if: env.skip_build != 'true'
run: npm install --legacy-peer-deps
run: npm install --legacy-peer-deps

- name: Build Linux
if: env.skip_build != 'true'
run: |
Expand All @@ -68,21 +65,21 @@ jobs:
run: |
version=$(jq -r '.version' package.json)
echo "icestudio_version=${version}" >> $GITHUB_OUTPUT

# Timestamp for the build
- id: build_date
if: env.skip_build != 'true'
run: |
timestamp=$(jq -r '.ts' app/buildinfo.json)
echo "icestudio_timestamp=${timestamp}" >> $GITHUB_OUTPUT

- name: 'Upload ZIP/Aarch64'
if: env.skip_build != 'true'
env:
ICESTUDIO_VERSION: "${{steps.icestudio_json.outputs.icestudio_version}}"
TIMESTAMP: "${{steps.build_date.outputs.icestudio_timestamp}}"
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
uses: 'actions/upload-artifact@v4'
with:
name: "Aarch64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-aarch64.zip"
name: 'Aarch64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-aarch64.zip'
if-no-files-found: error
38 changes: 17 additions & 21 deletions .github/workflows/main-osx-arm64.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Icestudio OSX ARM64'

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ develop ]
branches: [develop]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -18,13 +18,12 @@ jobs:
# The type of runner that the job will run on
#runs-on: macos-10.15
runs-on: macOS-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Check commit message for keyword RUN_BUILD
- name: Check commit message for RUN_BUILD
id: commit_message_check
Expand All @@ -36,21 +35,18 @@ jobs:
echo "skip_build=true" >> $GITHUB_ENV
fi




- name: Setup Nodejs version
if: env.skip_build != 'true'
uses: actions/setup-node@v3
with:
node-version: '22.7.0'

- name: Install npm dependencies
if: env.skip_build != 'true'
run: |
run: |
sed -i '' 's/darwinDependencies/dependencies/g' package.json
npm install --legacy-peer-deps

- name: Build OSX ARM64 packages
if: env.skip_build != 'true'
env:
Expand All @@ -73,31 +69,31 @@ jobs:
if: env.skip_build != 'true'
run: |
content=`tr '\n' ' ' < package.json`
echo "packageJson=${content}" >> $GITHUB_OUTPUT
echo "packageJson=${content}" >> $GITHUB_OUTPUT

# Timestamp for the build
- id: build_date
if: env.skip_build != 'true'
run: |
content=`tr '\n' ' ' < app/buildinfo.json`
echo "buildJson=${content}" >> $GITHUB_OUTPUT

- name: Sign DMG
if: env.skip_build != 'true'
env:
ICESTUDIO_VERSION: "${{fromJson(steps.icestudio_json.outputs.packageJson).version}}"
TIMESTAMP: "${{fromJson(steps.build_date.outputs.buildJson).ts}}"
ICESTUDIO_VERSION: '${{fromJson(steps.icestudio_json.outputs.packageJson).version}}'
TIMESTAMP: '${{fromJson(steps.build_date.outputs.buildJson).ts}}'
MACOS_APPLE_UID: ${{ secrets.APPLE_TEAM_ID }}
run: |
codesign --force --deep --sign ${MACOS_APPLE_UID} dist/icestudio-${ICESTUDIO_VERSION}${TIMESTAMP}-osxarm64.dmg -v

- name: 'Upload DMG/OSX64'
if: env.skip_build != 'true'
env:
ICESTUDIO_VERSION: "${{fromJson(steps.icestudio_json.outputs.packageJson).version}}"
TIMESTAMP: "${{fromJson(steps.build_date.outputs.buildJson).ts}}"
ICESTUDIO_VERSION: '${{fromJson(steps.icestudio_json.outputs.packageJson).version}}'
TIMESTAMP: '${{fromJson(steps.build_date.outputs.buildJson).ts}}'
uses: actions/upload-artifact@v4
with:
name: "osxarm64_DMG_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-osxarm64.dmg"
name: 'osxarm64_DMG_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-osxarm64.dmg'
if-no-files-found: error
40 changes: 19 additions & 21 deletions .github/workflows/main-windows.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Icestudio Windows'

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ develop ]
branches: [develop]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -20,7 +20,6 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checkout the develop branch
- uses: actions/checkout@v3

Expand All @@ -34,16 +33,16 @@ jobs:
echo "Commit message does not contain RUN_BUILD, skipping build."
echo "skip_build=true" >> $GITHUB_ENV
fi

- name: Setup Nodejs version
if: env.skip_build != 'true'
uses: actions/setup-node@v3
with:
node-version: '22.7.0'

- name: Install npm dependencies
run: npm install --legacy-peer-deps
run: npm install --legacy-peer-deps

# It is necesarry to install wine for building the package for
# windows. Also it is necesary to download the wine-mono windows
# installer and install it with wine
Expand All @@ -56,7 +55,7 @@ jobs:
wget https://dl.winehq.org/wine/wine-mono/5.0.0/wine-mono-5.0.0-x86.msi
export DISPLAY=:0.0
wine msiexec /i wine-mono-5.0.0-x86.msi

- name: Build Microsoft Windows package
if: env.skip_build != 'true'
run: |
Expand All @@ -74,33 +73,32 @@ jobs:
run: |
version=$(jq -r '.version' package.json)
echo "icestudio_version=${version}" >> $GITHUB_OUTPUT

# Timestamp for the build
- id: build_date
if: env.skip_build != 'true'
run: |
timestamp=$(jq -r '.ts' app/buildinfo.json)
echo "icestudio_timestamp=${timestamp}" >> $GITHUB_OUTPUT

- name: 'Upload MSI/win64'
if: env.skip_build != 'true'
env:
ICESTUDIO_VERSION: "${{steps.icestudio_json.outputs.icestudio_version}}"
TIMESTAMP: "${{steps.build_date.outputs.icestudio_timestamp}}"
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
uses: 'actions/upload-artifact@v4'
with:
name: "win64_MSI_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.exe"
name: 'win64_MSI_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.exe'
if-no-files-found: error

- name: 'Upload ZIP/win64'
if: env.skip_build != 'true'
env:
ICESTUDIO_VERSION: "${{steps.icestudio_json.outputs.icestudio_version}}"
TIMESTAMP: "${{steps.build_date.outputs.icestudio_timestamp}}"
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
uses: 'actions/upload-artifact@v4'
with:
name: "win64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}"
path: "dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.zip"
name: 'win64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.zip'
if-no-files-found: error

Loading
Loading