-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (110 loc) · 3.41 KB
/
Copy pathpush.yml
File metadata and controls
115 lines (110 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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 node18-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 node18-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@v4
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@v4
with:
name: gt-macos-x86-${{ github.sha }}
- name: Download linux
uses: actions/download-artifact@v4
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