Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,91 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

release-dashmate:
name: Release Dashmate packages
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- package_type: tarballs
os: ubuntu-22.04
- package_type: win
os: ubuntu-22.04
- package_type: deb
os: ubuntu-22.04
- package_type: macos
os: macos-12
steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install macOS build deps
if: runner.os == 'macOS'
run: |
brew install llvm docker colima
colima start
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH

- name: Install Linux build deps
if: runner.os == 'Linux'
run: sudo apt-get install -y nsis

- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: wasm32-unknown-unknown

- name: Enable corepack
run: corepack enable

- name: Disable NPM audit
run: npm config set audit false

- name: Enable Yarn unplugged modules cache
uses: actions/cache@v3
with:
path: '.yarn/unplugged'
key: ${{ runner.os }}-yarn-unplugged-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-unplugged-

# Workaround for lack of yarn 3 support in oclif
- name: Patch package-json
run: |
echo "$(jq '. |= .+ { "dependencies": {"debug": "^4.3.4", "lodash": "^4.17.21", "strip-ansi": "^6.0.1", "fs-extra": "^8.1" },}' package.json)" > package.json

- name: Install dependencies
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Build packages
run: yarn build
env:
CARGO_BUILD_PROFILE: release

- name: Generate manifest JSON
run: yarn workspace dashmate oclif manifest

- name: Create package
run: yarn workspace dashmate oclif pack {{ matrix.package_type }}

- name: Upload artifacts to action summary
uses: actions/upload-artifact@v3
if: github.event_name != 'release'
with:
name: dashmate
path: packages/dashmate/dist/**

- name: Upload artifacts to release
uses: softprops/[email protected]
if: github.event_name == 'release'
with:
files: packages/dashmate/dist/**
Loading