From 743c6afc3ac3ed1d27211f0ae57d2c93a72c837a Mon Sep 17 00:00:00 2001 From: cballevre Date: Wed, 18 Sep 2024 15:44:25 +0200 Subject: [PATCH 1/2] chore: Use publish keyword instead deploy to be coherent with other apps --- .github/workflows/ci.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d5dfa6..dcfecbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,6 @@ jobs: uses: webfactory/ssh-agent@v0.9.0 with: ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }} - - name: Deploy + - name: Publish if: github.ref == 'refs/heads/master' - run: yarn run deploy --yes + run: yarn run cozyPublish --yes diff --git a/package.json b/package.json index 1ebd76a..ba6002d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "cs build --barV7 false", "watch": "cs watch --barV7 false", "test": "env NODE_ENV=test cs test --verbose --coverage", - "deploy": "cozy-app-publish --token $REGISTRY_TOKEN --prepublish downcloud --postpublish mattermost --space beta_tests", + "cozyPublish": "cozy-app-publish --token $REGISTRY_TOKEN --prepublish downcloud --postpublish mattermost --space beta_tests", "version": "yarn version:manifest", "version:manifest": "replace '\\d+\\.\\d+\\.\\d+' $npm_package_version ./manifest.webapp" }, From 56aaea9065139267c38e3448080806969eab93ec Mon Sep 17 00:00:00 2001 From: cballevre Date: Wed, 18 Sep 2024 15:46:41 +0200 Subject: [PATCH 2/2] chore: Deploy when using Github releases with tag --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcfecbd..86da36b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: push: branches: - master + tags: + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' env: MATTERMOST_CHANNEL: '{"dev":"papillon","beta":"papillon,publication","stable":"papillon,publication"}' @@ -35,5 +38,5 @@ jobs: with: ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }} - name: Publish - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') run: yarn run cozyPublish --yes