diff --git a/.bundlemonrc b/.bundlemonrc new file mode 100644 index 000000000..bc6188538 --- /dev/null +++ b/.bundlemonrc @@ -0,0 +1,15 @@ +{ + "baseDir": "./build-browser", + "files": [ + { + "path": "app/main..js" + }, + { + "path": "app/main.js" + }, + { + "path": "app/vendor.js" + } + ], + "reportOutput": ["github"] +} diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 000000000..cc3db76e5 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -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: yarn install --frozen-lockfile + - name: Lint + run: yarn lint + - name: Build + run: yarn build:browser:prod + - name: BundleMon + uses: lironer/bundlemon-action@v1 + - name: Set SSH for downcloud + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }} + - name: Publish + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + run: yarn run cozyPublish --yes diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9fef06b82..000000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -language: node_js -matrix: - fast_finish: true -node_js: -- '14' -branches: - only: - - master - # tags - - /^\d+\.\d+\.\d+(\-beta.\d+)?$/ -env: - global: - - MATTERMOST_CHANNEL='{"dev":"feat---password-mgr","beta":"feat---password-mgr,publication","stable":"feat---password-mgr,publication"}' - # GITHUB_TOKEN for yarn deploy script - - secure: "jEPzBB2l9h4xyTqVI4SY2G3EHk35B5QldDnt5obpl74yUookiIV2h8Hwr7LwHwXzN3M83MCORelZ9VG1BbbZ3pqi68Fybe6A38cFVirmQa3ylsXRYCNnE/YOul+aXSwqQuC8SYeLcqpg3oLiZQJdCohP7LG4MqNJexHT21mjgrPI7FB/h1feVu9gzsIxtJ1hhSeGgW3Q7HT6Na1wA53UJ/bU1w84rHbjoDxLWw9jd93W+rMr9UTtWzeC6SL6iFi9Pd4N1vKjWFlEEWBAv8dH09LrmBuZMtKZtN7ZNfN3wDGzdvnp7Kj87pJf2yaiFtWCfJknM5RbXE93BIGSynOOaJsqoooo49QbwsLoygmc3VmbOc4QPusC1EdrF5/EaEeMuPuH/N/Zjo8lopjfpqIRSEGrZiCc6Ing+l0WgzCJ1LEPormONTqA6WF/0a3DtKPWMV76wJYIXeHz6DAvYskYwbrMgsPxTKxQO7lfNCX0azIFqodTdDPZTcxh9AJRURKJwZ4BV9AiPEadOzD+iB4yi3Fw226kNoNvUTjpexd0kenQb/kQNXBNAssPcPHiM/BRIf+l7n9thmWom4K2VQ49OFSG+v+I3pR7s8DZtxJALdWiFL2imf2PHhD0kapCki7nTWkZ0yC9AndYm7qQblUotV7Mp+bpdd2WX0Npcu40vYA=" - # REGISTRY_TOKEN for yarn cozyPublish script - - secure: "wMOM7oD/Q//k8dho5K/dn+BagOeCMXm/60XJ+Gb07C4w6ynuQgiuANPM6f5eguflodTUX0Sv5D7x+y8+bITPc1aI7QbVDWphJa7UrCfNKgkTvU39jWDFkG1ZdYom6cngoosZ18ndVJ/L6K7YpM0FvmIl9tGneXIWbZoy2rBeoqMff1Ispc34TcKEvMyKyNgxaVb32vcp4nwDzwrHjjWAhSElfUCk5SAqb7ThtTGgWwWAfxhuQ1WxVI2QmM1f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P7RhKMkCy+0LCTNxP7RZ0W9Zgo7SRMF+cihkzn0SgtE/oLro/e/DNYsAG/gg=" -cache: - yarn: true - directories: - - node_modules -script: - - npm run lint - - npm run build:browser:prod -before_install: - - sudo apt-get install libsecret-1-dev - - if [ "$TRAVIS_SECURE_ENV_VARS" != "false" ]; then openssl aes-256-cbc -K $encrypted_95a52b3b9b3c_key -iv $encrypted_95a52b3b9b3c_iv -in id_rsa_downcloud_cozy_pass_web.enc -out id_rsa_downcloud_cozy_pass_web -d; fi - - if [ "$TRAVIS_SECURE_ENV_VARS" != "false" ]; then eval "$(ssh-agent -s)"; fi - - if [ "$TRAVIS_SECURE_ENV_VARS" != "false" ]; then chmod 600 id_rsa_downcloud_cozy_pass_web; fi - - if [ "$TRAVIS_SECURE_ENV_VARS" != "false" ]; then ssh-add id_rsa_downcloud_cozy_pass_web; fi -before_deploy: - - yarn add cozy-app-publish -deploy: - - provider: script - skip_cleanup: true - # deploy the build on downcloud and publish to the Cozy registry - script: yarn cozyPublish - on: - branch: master - - provider: script - skip_cleanup: true - # publish stable or beta versions using Github Releases (git tag) - script: yarn cozyPublish - on: - tags: true \ No newline at end of file diff --git a/id_rsa_downcloud_cozy_pass_web.enc b/id_rsa_downcloud_cozy_pass_web.enc deleted file mode 100644 index ce6427a0b..000000000 Binary files a/id_rsa_downcloud_cozy_pass_web.enc and /dev/null differ diff --git a/package.json b/package.json index f47118c33..253f9d760 100644 --- a/package.json +++ b/package.json @@ -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",