Skip to content

Commit

Permalink
chore: Add CI with Github Actions
Browse files Browse the repository at this point in the history
And remove Travis
  • Loading branch information
Merkur39 committed Oct 17, 2024
1 parent 6c85e0d commit d7a73ea
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 48 deletions.
15 changes: 15 additions & 0 deletions .bundlemonrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"baseDir": "./build-browser",
"files": [
{
"path": "app/main.<hash>.js"
},
{
"path": "app/main.js"
},
{
"path": "app/vendor.js"
}
],
"reportOutput": ["github"]
}
43 changes: 43 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI/CD

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

env:
MATTERMOST_CHANNEL: '{"dev":"feat---password-mgr","beta":"feat---password-mgr,publication","stable":"feat---password-mgr,publication"}'
MATTERMOST_HOOK_URL: ${{ secrets.MATTERMOST_HOOK_URL }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
BUNDLEMON_PROJECT_ID: ${{ secrets.BUNDLEMON_PROJECT_ID }}

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: npm install --frozen-lockfile --legacy-peer-deps
- name: Lint
run: npm run lint
- name: Build
run: npm run build:browser:prod
- name: BundleMon
uses: lironer/bundlemon-action@v1
- name: Set SSH for downcloud
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }}
- name: Publish
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
run: npm run cozyPublish --yes
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.15.5
v14.16.0
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

Binary file removed id_rsa_downcloud_cozy_pass_web.enc
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@types/zxcvbn": "^4.4.1",
"babel-loader": "^8.2.2",
"babel-preset-cozy-app": "^1.11.0",
"bundlemon": "1.4.0",
"clean-webpack-plugin": "^3.0.0",
"concurrently": "^6.0.2",
"copy-webpack-plugin": "^6.4.0",
Expand Down

0 comments on commit d7a73ea

Please sign in to comment.