Release v0.2.2 (#82) #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 @danerwilliams/charcoal 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: [macos, ubuntu] | |
include: | |
- os: macos | |
build: yarn workspace @danerwilliams/charcoal run build-pkg -t node16-macos -o "gt-macos-x86-${{ github.sha }}" | |
artifact-name: gt-macos-x86-${{ github.sha }} | |
artifact-path: apps/cli/gt-macos-x86-${{ github.sha }} | |
- os: ubuntu | |
build: yarn workspace @danerwilliams/charcoal 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 mac x86 | |
uses: actions/download-artifact@v3 | |
with: | |
name: gt-macos-x86-${{ github.sha }} | |
- name: Download linux | |
uses: actions/download-artifact@v3 | |
with: | |
name: gt-linux-${{ github.sha }} | |
- name: Rename files | |
run: | | |
mv gt-macos-x86-${{ github.sha }} gt-macos-x86; | |
mv gt-linux-${{ github.sha }} gt-linux | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "gt-macos-x86,gt-linux" | |
draft: false | |
prerelease: true | |
allowUpdates: true |