Skip to content

Commit

Permalink
chore: Configure CI to publish the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldoppea committed Oct 16, 2024
1 parent a148bb8 commit ae2b0bd
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 8 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI/CD

on:
pull_request:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'

env:
MATTERMOST_CHANNEL: '{"dev":"feat---ai--llm","beta":"feat---ai--llm,publication","stable":"feat---ai--llm,publication"}'
MATTERMOST_HOOK_URL: ${{ secrets.MATTERMOST_HOOK_URL }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
TARGETS_DEV: recette.cozy.works
TARGETS_BETA: betatest.cozy.works

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build
- name: Set SSH for downcloud
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }}
- name: Deploy
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
run: yarn cozyPublish --yes
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"version": "1.0.0",
"scripts": {
"cozyPublish": "cozy-app-publish --token $REGISTRY_TOKEN --prepublish downcloud --postpublish mattermost",
"dev": "rsbuild dev --open",
"build": "rsbuild build",
"watch": "rsbuild build --watch",
Expand All @@ -12,6 +13,7 @@
},
"dependencies": {
"comlink": "^4.4.1",
"cozy-app-publish": "^0.34.0",
"cozy-client": "^49.0.0",
"cozy-device-helper": "^3.1.0",
"cozy-flags": "^4.0.0",
Expand Down
Loading

0 comments on commit ae2b0bd

Please sign in to comment.