Skip to content

Commit cf61ce6

Browse files
committed
chore: Create "Release" Github Action to replace travis
1 parent 28118c9 commit cf61ce6

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI/CD
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
- '[0-9]+.[0-9]+.[0-9]+'
10+
- '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
11+
12+
env:
13+
MATTERMOST_CHANNEL: '{"dev":"app---home","beta":"app---home,publication","stable":"app---home,publication"}'
14+
MATTERMOST_HOOK_URL: ${{ secrets.MATTERMOST_HOOK_URL }}
15+
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
16+
TARGETS_DEV: recette.cozy.works
17+
TARGETS_BETA: betatest.cozy.works
18+
BUNDLEMON_PROJECT_ID: ${{ secrets.BUNDLEMON_PROJECT_ID }}
19+
20+
jobs:
21+
build:
22+
name: Build and publish
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Use Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version-file: '.nvmrc'
31+
- name: Install dependencies
32+
run: yarn install --frozen-lockfile
33+
- name: Lint
34+
run: yarn lint
35+
- name: Test
36+
run: yarn test
37+
- name: Build
38+
run: yarn build
39+
- name: BundleMon
40+
uses: lironer/bundlemon-action@v1
41+
- name: Set SSH for downcloud
42+
uses: webfactory/[email protected]
43+
with:
44+
ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }}
45+
- name: Deploy
46+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
47+
run: yarn cozyPublish --yes

0 commit comments

Comments
 (0)