Skip to content

Update readme (#8)

Update readme (#8) #5

Workflow file for this run

name: Push CI
permissions:
contents: write
on:
push:
branches: [main]
tags:
- "v*"
jobs:
lint_and_fast_tests:
name: 'Run CLI tests'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 15.x, 16.x, 17.x, 18.x, current]
steps:
# Basic setup
- uses: actions/checkout@v3
with:
clean: 'false'
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install --immutable
- name: Build
run: yarn turbo run build
- name: Setup git
run: git config --global user.email "test@gmail.com" && git config --global user.name "test"
- name: Git Version
run: git --version
- name: Test
run: yarn workspace @withgraphite/graphite-cli run test
superlinter:
name: 'Run superlinter'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v4
continue-on-error: true
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier
create-binaries:
name: Upload executable binaries
strategy:
matrix:
os: [windows, macos, ubuntu]
include:
- os: windows
build: yarn workspace @withgraphite/graphite-cli run build-pkg -t node16-win -o "gt-win-${{ github.sha }}" --debug
artifact-name: gt-win-${{ github.sha }}.exe
artifact-path: apps\cli\gt-win-${{ github.sha }}.exe
- os: macos
build: yarn workspace @withgraphite/graphite-cli run build-pkg -t node16-macos -o "gt-macos-${{ github.sha }}"
artifact-name: gt-macos-${{ github.sha }}
artifact-path: apps/cli/gt-macos-${{ github.sha }}
- os: ubuntu
build: yarn workspace @withgraphite/graphite-cli run build-pkg -t node16-linux -o "gt-linux-${{ github.sha }}"
artifact-name: gt-linux-${{ github.sha }}
artifact-path: apps/cli/gt-linux-${{ github.sha }}
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install
run: yarn install --immutable
- name: Build
run: yarn turbo run build
- name: Build binary
run: ${{ matrix.build }}
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-path }}
release:
name: Release version
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint_and_fast_tests, create-binaries]
runs-on: ubuntu-latest
steps:
- name: Download windows
uses: actions/download-artifact@v3
with:
name: gt-win-${{ github.sha }}.exe
- name: Download mac
uses: actions/download-artifact@v3
with:
name: gt-macos-${{ github.sha }}
- name: Download linux
uses: actions/download-artifact@v3
with:
name: gt-linux-${{ github.sha }}
- name: Rename files
run: |
mv gt-win-${{ github.sha }}.exe gt-win.exe;
mv gt-macos-${{ github.sha }} gt-macos;
mv gt-linux-${{ github.sha }} gt-linux
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "gt-win.exe,gt-macos,gt-linux"
draft: false
prerelease: true
allowUpdates: true