Switch workflows from npm to yarn (#2750)

This commit is contained in:
absidue 2022-10-20 12:33:00 +02:00 committed by GitHub
parent 76d7ecd163
commit 9a789337ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 41 deletions

View File

@ -13,7 +13,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [16.x] node-version: [16.x]
runtime: runtime:
- linux-x64 - linux-x64
- linux-armv7l - linux-armv7l
- linux-arm64 - linux-arm64
@ -29,7 +29,7 @@ jobs:
- runtime: linux-armv7l - runtime: linux-armv7l
os: ubuntu-latest os: ubuntu-latest
- runtime: linux-arm64 - runtime: linux-arm64
os: ubuntu-latest os: ubuntu-latest
@ -38,7 +38,7 @@ jobs:
# - runtime: osx-arm64 # - runtime: osx-arm64
# os: macOS-latest # os: macOS-latest
- runtime: win-x64 - runtime: win-x64
os: windows-latest os: windows-latest
@ -54,8 +54,8 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: "yarn" cache: "yarn"
- run: npm run ci - run: yarn run ci
- run: npm run lint - run: yarn run lint
- name: Get Version Number - name: Get Version Number
uses: nyaayaya/package-version@v1 uses: nyaayaya/package-version@v1
with: with:
@ -92,20 +92,20 @@ jobs:
- name: Install libarchive-tools - name: Install libarchive-tools
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}" run: sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}"
- name: Build x64 with Node.js ${{ matrix.node-version}} - name: Build x64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'x64') if: contains(matrix.runtime, 'x64')
run: npm run build --if-present run: yarn run build --if-present
- name: Build ARMv7l with Node.js ${{ matrix.node-version}} - name: Build ARMv7l with Node.js ${{ matrix.node-version}}
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l')
run: npm run build:arm32 --if-present run: yarn run build:arm32 --if-present
- name: Build ARM64 with Node.js ${{ matrix.node-version}} - name: Build ARM64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'arm64') if: contains(matrix.runtime, 'arm64')
run: npm run build:arm64 --if-present run: yarn run build:arm64 --if-present
- name: Upload Linux .zip x64 Artifact - name: Upload Linux .zip x64 Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@ -162,7 +162,7 @@ jobs:
with: with:
name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb
path: build/freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb path: build/freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb
- name: Upload .deb ARM64 Artifact - name: Upload .deb ARM64 Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
@ -197,7 +197,7 @@ jobs:
with: with:
name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.rpm name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.rpm
path: build/freetube-${{ steps.versionNumber.outputs.result }}.x86_64.rpm path: build/freetube-${{ steps.versionNumber.outputs.result }}.x86_64.rpm
# rpm are not built for armv7l # rpm are not built for armv7l
- name: Upload .rpm ARM64 Artifact - name: Upload .rpm ARM64 Artifact
@ -220,7 +220,7 @@ jobs:
with: with:
name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_armv7l.apk name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_armv7l.apk
path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.apk path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.apk
- name: Upload Alpine .apk ARM64 Artifact - name: Upload Alpine .apk ARM64 Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
@ -248,14 +248,14 @@ jobs:
with: with:
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe
- name: Upload Windows arm64 .exe Artifact - name: Upload Windows arm64 .exe Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64')
with: with:
name: freetube-${{ steps.versionNumber.outputs.result }}-setup-arm64.exe name: freetube-${{ steps.versionNumber.outputs.result }}-setup-arm64.exe
path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe
- name: Upload Windows x64 .zip Artifact - name: Upload Windows x64 .zip Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
@ -283,7 +283,7 @@ jobs:
with: with:
name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable.7z name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable.7z
path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.7z
- name: Upload Windows x64 Portable Artifact - name: Upload Windows x64 Portable Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
@ -297,21 +297,21 @@ jobs:
with: with:
name: freetube-${{ steps.versionNumber.outputs.result }}-portable-arm64.exe name: freetube-${{ steps.versionNumber.outputs.result }}-portable-arm64.exe
path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe
- name: Upload Mac x64 .dmg Artifact - name: Upload Mac x64 .dmg Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
with: with:
name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg
path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg
# - name: Upload Mac arm64 .dmg Artifact # - name: Upload Mac arm64 .dmg Artifact
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') # if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64')
# with: # with:
# name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg # name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg
# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg # path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg
- name: Upload Mac x64 .zip Artifact - name: Upload Mac x64 .zip Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')

View File

@ -23,5 +23,5 @@ jobs:
with: with:
node-version: 16.x node-version: 16.x
cache: "yarn" cache: "yarn"
- run: npm run ci - run: yarn run ci
- run: npm run lint - run: yarn run lint

View File

@ -13,7 +13,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [16.x] node-version: [16.x]
runtime: runtime:
- linux-x64 - linux-x64
- linux-armv7l - linux-armv7l
- linux-arm64 - linux-arm64
@ -29,19 +29,19 @@ jobs:
- runtime: linux-armv7l - runtime: linux-armv7l
os: ubuntu-latest os: ubuntu-latest
- runtime: linux-arm64 - runtime: linux-arm64
os: ubuntu-latest os: ubuntu-latest
- runtime: osx-x64 - runtime: osx-x64
os: macOS-latest os: macOS-latest
# - runtime: osx-arm64 # - runtime: osx-arm64
# os: macOS-latest # os: macOS-latest
- runtime: win-x64 - runtime: win-x64
os: windows-latest os: windows-latest
- runtime: win-arm64 - runtime: win-arm64
os: windows-latest os: windows-latest
@ -54,8 +54,8 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: "yarn" cache: "yarn"
- run: npm run ci - run: yarn run ci
- run: npm run lint - run: yarn run lint
- name: Get Version Number - name: Get Version Number
uses: nyaayaya/package-version@v1 uses: nyaayaya/package-version@v1
@ -65,15 +65,15 @@ jobs:
- name: Build x64 with Node.js ${{ matrix.node-version}} - name: Build x64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'x64') if: contains(matrix.runtime, 'x64')
run: npm run build --if-present run: yarn run build --if-present
- name: Build ARMv7l with Node.js ${{ matrix.node-version}} - name: Build ARMv7l with Node.js ${{ matrix.node-version}}
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l')
run: npm run build:arm32 --if-present run: yarn run build:arm32 --if-present
- name: Build ARM64 with Node.js ${{ matrix.node-version}} - name: Build ARM64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'arm64') if: contains(matrix.runtime, 'arm64')
run: npm run build:arm64 --if-present run: yarn run build:arm64 --if-present
- name: Upload AppImage x64 Release - name: Upload AppImage x64 Release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
@ -173,7 +173,7 @@ jobs:
asset_name: freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb asset_name: freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb
asset_path: build/freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb asset_path: build/freetube_${{ env.PACKAGE_VERSION }}_armv7l.deb
asset_content_type: application/vnd.debian.binary-package asset_content_type: application/vnd.debian.binary-package
- name: Upload Linux .deb ARM64 Release - name: Upload Linux .deb ARM64 Release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64')
@ -195,7 +195,7 @@ jobs:
asset_name: freetube_${{ env.PACKAGE_VERSION }}_amd64.rpm asset_name: freetube_${{ env.PACKAGE_VERSION }}_amd64.rpm
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.x86_64.rpm asset_path: build/freetube-${{ env.PACKAGE_VERSION }}.x86_64.rpm
asset_content_type: application/x-rpm asset_content_type: application/x-rpm
# rpm are not built for armv7l # rpm are not built for armv7l
- name: Upload Linux .rpm ARM64 Release - name: Upload Linux .rpm ARM64 Release
@ -274,7 +274,7 @@ jobs:
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.7z asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.7z
asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-win.7z asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-win.7z
asset_content_type: application/x-7z-compressed asset_content_type: application/x-7z-compressed
- name: Upload Windows x64 portable Release - name: Upload Windows x64 portable Release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64')
@ -296,7 +296,7 @@ jobs:
asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.exe asset_name: freetube-${{ env.PACKAGE_VERSION }}-win-arm64-portable.exe
asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe asset_path: build/FreeTube ${{ env.PACKAGE_VERSION }}.exe
asset_content_type: application/x-ms-dos-executable asset_content_type: application/x-ms-dos-executable
- name: Upload Mac x64 .dmg Release - name: Upload Mac x64 .dmg Release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
@ -318,7 +318,7 @@ jobs:
# asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.dmg # asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.dmg
# asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64.dmg # asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64.dmg
# asset_content_type: application/x-apple-diskimage # asset_content_type: application/x-apple-diskimage
- name: Upload Mac x64 .zip Release - name: Upload Mac x64 .zip Release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64')
@ -351,4 +351,4 @@ jobs:
# asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.zip # asset_name: freetube-${{ env.PACKAGE_VERSION }}-mac-arm64.zip
# asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-mac.zip # asset_path: build/freetube-${{ env.PACKAGE_VERSION }}-arm64-mac.zip
# asset_content_type: application/x-apple-diskimage # asset_content_type: application/x-apple-diskimage

View File

@ -38,12 +38,11 @@
"pack:renderer": "webpack --mode=production --node-env=production --config _scripts/webpack.renderer.config.js", "pack:renderer": "webpack --mode=production --node-env=production --config _scripts/webpack.renderer.config.js",
"pack:web": "webpack --mode=production --node-env=production --config _scripts/webpack.web.config.js", "pack:web": "webpack --mode=production --node-env=production --config _scripts/webpack.web.config.js",
"pack:workers": "webpack --mode=production --node-env=production --config _scripts/webpack.workers.config.js", "pack:workers": "webpack --mode=production --node-env=production --config _scripts/webpack.workers.config.js",
"postinstall": "npm run rebuild:electron", "postinstall": "yarn run --silent rebuild:electron",
"prettier": "prettier --write \"{src,_scripts}/**/*.{js,vue}\"", "prettier": "prettier --write \"{src,_scripts}/**/*.{js,vue}\"",
"rebuild:electron": "electron-builder install-app-deps", "rebuild:electron": "electron-builder install-app-deps",
"rebuild:node": "npm rebuild",
"release": "run-s test build", "release": "run-s test build",
"ci": "yarn install --frozen-lockfile" "ci": "yarn install --silent --frozen-lockfile"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.2.0", "@fortawesome/fontawesome-svg-core": "^6.2.0",