-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (125 loc) · 3.78 KB
/
Copy pathci.yml
File metadata and controls
130 lines (125 loc) · 3.78 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: ci
on:
push:
branches:
- master
tags:
- v*
pull_request:
env:
NODE_VERSION: 20
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
if: (!contains(github.ref, 'refs/heads/master') || contains(github.ref, 'refs/tags/v'))
timeout-minutes: 10
steps:
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: '${{ vars.PNPM_VERSION }}'
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Lint JS
run: pnpm lint:js
- name: Lint HBS
run: pnpm prettier **/*.hbs -c
tests:
name: Tests
runs-on: ubuntu-24.04
if: (!contains(github.ref, 'refs/heads/master') || contains(github.ref, 'refs/tags/v'))
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- name: current
command: pnpm test:ember
- name: next
command: pnpm ember try:one ember-4.12
steps:
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: '${{ vars.PNPM_VERSION }}'
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Run ${{ matrix.name }} scenario
run: ${{ matrix.command }}
release:
name: Release Package
runs-on: ubuntu-24.04
if: contains(github.ref, 'refs/tags/v')
needs: [lint, tests]
timeout-minutes: 10
steps:
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: '${{ vars.PNPM_VERSION }}'
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
registry-url: 'https://npm.pkg.github.com'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Package Version
id: pkg_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Trigger upfluence-web/deploy
uses: benc-uk/workflow-dispatch@v1
with:
repo: upfluence/upfluence-web
ref: staging
workflow: Bump Dependency
token: ${{ secrets.PAT_TOKEN }}
inputs: |
{"package": "@upfluence/hypertable", "version": "^${{ steps.pkg_version.outputs.VERSION }}", "user": "${{ github.event.pusher.name }}"}
deploy:
name: Deploy preview app
runs-on: ubuntu-24.04
needs: [lint, tests]
if: ${{ github.ref == 'refs/heads/master' }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: '${{ vars.PNPM_VERSION }}'
- uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Ember Build
run: pnpm ember build --silent --environment=production
- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/