@@ -412,3 +412,91 @@ jobs:
412412 tags : ${{ steps.docker_meta.outputs.tags }}
413413 labels : ${{ steps.docker_meta.outputs.labels }}
414414 platforms : linux/amd64,linux/arm64
415+
416+ release-dashmate :
417+ name : Release Dashmate packages
418+ runs-on : ${{ matrix.os }}
419+ strategy :
420+ fail-fast : false
421+ matrix :
422+ include :
423+ - package_type : tarballs
424+ os : ubuntu-22.04
425+ - package_type : win
426+ os : ubuntu-22.04
427+ - package_type : deb
428+ os : ubuntu-22.04
429+ - package_type : macos
430+ os : macos-12
431+ steps :
432+ - name : Check out repo
433+ uses : actions/checkout@v3
434+
435+ - name : Setup Node.JS
436+ uses : actions/setup-node@v3
437+ with :
438+ node-version : ' 16'
439+
440+ - name : Install macOS build deps
441+ if : runner.os == 'macOS'
442+ run : |
443+ brew install llvm docker colima
444+ colima start
445+ echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
446+
447+ - name : Install Linux build deps
448+ if : runner.os == 'Linux'
449+ run : sudo apt-get install -y nsis
450+
451+ - uses : dtolnay/rust-toolchain@master
452+ with :
453+ toolchain : stable
454+ target : wasm32-unknown-unknown
455+
456+ - name : Enable corepack
457+ run : corepack enable
458+
459+ - name : Disable NPM audit
460+ run : npm config set audit false
461+
462+ - name : Enable Yarn unplugged modules cache
463+ uses : actions/cache@v3
464+ with :
465+ path : ' .yarn/unplugged'
466+ key : ${{ runner.os }}-yarn-unplugged-${{ hashFiles('yarn.lock') }}
467+ restore-keys : |
468+ ${{ runner.os }}-yarn-unplugged-
469+
470+ # Workaround for lack of yarn 3 support in oclif
471+ - name : Patch package-json
472+ run : |
473+ echo "$(jq '. |= .+ { "dependencies": {"debug": "^4.3.4", "lodash": "^4.17.21", "strip-ansi": "^6.0.1", "fs-extra": "^8.1" },}' package.json)" > package.json
474+
475+ - name : Install dependencies
476+ run : yarn install
477+ env :
478+ YARN_ENABLE_IMMUTABLE_INSTALLS : false
479+
480+ - name : Build packages
481+ run : yarn build
482+ env :
483+ CARGO_BUILD_PROFILE : release
484+
485+ - name : Generate manifest JSON
486+ run : yarn workspace dashmate oclif manifest
487+
488+ - name : Create package
489+ run : yarn workspace dashmate oclif pack {{ matrix.package_type }}
490+
491+ - name : Upload artifacts to action summary
492+ uses : actions/upload-artifact@v3
493+ if : github.event_name != 'release'
494+ with :
495+ name : dashmate
496+ path : packages/dashmate/dist/**
497+
498+ - name : Upload artifacts to release
499+ 500+ if : github.event_name == 'release'
501+ with :
502+ files : packages/dashmate/dist/**
0 commit comments