diff --git a/.github/workflows/build_publish_api.yml b/.github/workflows/build_publish_api.yml index 00719c0..b411516 100644 --- a/.github/workflows/build_publish_api.yml +++ b/.github/workflows/build_publish_api.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest outputs: wheel: ${{ steps.wheel.outputs.wheel }} - api_version: ${{ steps.version.outputs.api_version }} + version: ${{ steps.version.outputs.version }} steps: - name: Check out the repo uses: actions/checkout@v4 @@ -71,15 +71,15 @@ jobs: - name: Output version id: version - run: echo "api_version=$(task api:poetry:version-short)" >> $GITHUB_OUTPUT + run: echo "version=$(task api:poetry:version-short)" >> $GITHUB_OUTPUT - name: Output wheel id: wheel - run: echo "wheel=ecoindex_api-${{ steps.version.outputs.api_version }}-py3-none-any.whl" >> $GITHUB_OUTPUT + run: echo "wheel=ecoindex_api-${{ steps.version.outputs.version }}-py3-none-any.whl" >> $GITHUB_OUTPUT - name: Output summary run: | - echo "API version ${{ steps.version.outputs.api_version }}" >> $GITHUB_STEP_SUMMARY + echo "API version ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY echo "Wheel ${{ steps.wheel.outputs.wheel }}" >> $GITHUB_STEP_SUMMARY backend_image: @@ -120,7 +120,7 @@ jobs: context: projects/ecoindex_api platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.tags }},vvatelot/ecoindex-api-backend:${{ needs.python_project.outputs.api_version }},${{ !env.PRERELEASE && 'vvatelot/ecoindex-api-backend:latest' || '' }} + tags: ${{ steps.meta.outputs.tags }},vvatelot/ecoindex-api-backend:${{ needs.python_project.outputs.version }},${{ !contains(inputs.bump, 'pre') && 'vvatelot/ecoindex-api-backend:latest' || '' }} labels: ${{ steps.meta.outputs.labels }} file: projects/ecoindex_api/docker/backend/dockerfile build-args: wheel=${{ needs.python_project.outputs.wheel }} @@ -163,7 +163,7 @@ jobs: context: projects/ecoindex_api platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.tags }},vvatelot/ecoindex-api-worker:${{ needs.python_project.outputs.api_version }},${{ !env.PRERELEASE && 'vvatelot/ecoindex-api-worrker:latest' || '' }} + tags: ${{ steps.meta.outputs.tags }},vvatelot/ecoindex-api-worker:${{ needs.python_project.outputs.version }},${{ !contains(inputs.bump, 'pre') && 'vvatelot/ecoindex-api-worker:latest' || '' }} labels: ${{ steps.meta.outputs.labels }} file: projects/ecoindex_api/docker/worker/dockerfile build-args: wheel=${{ needs.python_project.outputs.wheel }} @@ -206,8 +206,8 @@ jobs: - name: Commit files uses: EndBug/add-and-commit@v9 with: - message: "chore(api): Bump API version to ${{ needs.python_project.outputs.api_version }}" - tag: v${{ needs.python_project.outputs.api_version }}@api + message: "chore(api): Bump API version to ${{ needs.python_project.outputs.version }}" + tag: v${{ needs.python_project.outputs.version }}@api tag_push: "--force" push: true @@ -216,27 +216,35 @@ jobs: uses: requarks/changelog-action@v1 with: token: ${{ github.token }} - fromTag: v${{ needs.python_project.outputs.api_version }}@api + fromTag: v${{ needs.python_project.outputs.version }}@api toTag: ${{ steps.last_tag.outputs.tag }} excludeScopes: cli changelogFilePath: /tmp/changelog.md - name: Update changelog content with dockerhub links run: | + echo "${{ steps.changelog.outputs.changes }}" > /tmp/changelog.md echo "" >> /tmp/changelog.md echo "### Docker images" >> /tmp/changelog.md echo "" >> /tmp/changelog.md echo "Docker images have been built and pushed to Docker Hub. You can find them here:" >> /tmp/changelog.md - echo "- **Backend**: [vvatelot/ecoindex-api-backend:${{ needs.python_project.outputs.api_version }}](https://hub.docker.com/r/vvatelot/ecoindex-api-backend/tags?page=1&name=${{ needs.python_project.outputs.api_version }})" >> /tmp/changelog.md - echo "- **Worker**: [vvatelot/ecoindex-api-worker:${{ needs.python_project.outputs.api_version }}](https://hub.docker.com/r/vvatelot/ecoindex-api-worker/tags?page=1&name=${{ needs.python_project.outputs.api_version }})" >> /tmp/changelog.md + echo "- **Backend**: [vvatelot/ecoindex-api-backend:${{ needs.python_project.outputs.version }}](https://hub.docker.com/r/vvatelot/ecoindex-api-backend/tags?page=1&name=${{ needs.python_project.outputs.version }})" >> /tmp/changelog.md + echo "- **Worker**: [vvatelot/ecoindex-api-worker:${{ needs.python_project.outputs.version }}](https://hub.docker.com/r/vvatelot/ecoindex-api-worker/tags?page=1&name=${{ needs.python_project.outputs.version }})" >> /tmp/changelog.md - name: Create Release + id: create_release uses: ncipollo/release-action@v1 with: allowUpdates: true prerelease: ${{ env.PRERELEASE }} makeLatest: true - name: "API: v${{ needs.python_project.outputs.api_version }}" - tag: v${{ needs.python_project.outputs.api_version }}@api + name: "API: v${{ needs.python_project.outputs.version }}" + tag: v${{ needs.python_project.outputs.version }}@api token: ${{ github.token }} bodyFile: /tmp/changelog.md + + - name: Notify to Mattermost + if: ${{ !env.PRERELEASE }} + run: | + echo -e "{\"icon_url\":\"https://icon-library.com/images/github-icon-png/github-icon-png-29.jpg\",\"text\":\":tada: Une nouvelle release a été publiée pour le projet **${{ github.repository }}: v${{ needs.python_project.outputs.version }}** :tada:\n\nPlus d'infos ici: ${{ steps.create_release.outputs.html_url }}\"}" > mattermost.json + curl -X POST -H 'Content-Type: application/json' -d @mattermost.json ${{ secrets.MATTERMOST_RELEASE_URL }} diff --git a/.github/workflows/build_publish_cli.yml b/.github/workflows/build_publish_cli.yml index 2baf8b2..c5323d5 100644 --- a/.github/workflows/build_publish_cli.yml +++ b/.github/workflows/build_publish_cli.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest outputs: wheel: ${{ steps.wheel.outputs.wheel }} - cli_version: ${{ steps.version.outputs.cli_version }} + version: ${{ steps.version.outputs.version }} steps: - name: Check out the repo uses: actions/checkout@v4 @@ -71,15 +71,15 @@ jobs: - name: Output version id: version - run: echo "cli_version=$(task cli:poetry:version-short)" >> $GITHUB_OUTPUT + run: echo "version=$(task cli:poetry:version-short)" >> $GITHUB_OUTPUT - name: Output wheel id: wheel - run: echo "wheel=ecoindex_cli-${{ steps.version.outputs.cli_version }}-py3-none-any.whl" >> $GITHUB_OUTPUT + run: echo "wheel=ecoindex_cli-${{ steps.version.outputs.version }}-py3-none-any.whl" >> $GITHUB_OUTPUT - name: Output summary run: | - echo "CLI version ${{ steps.version.outputs.cli_version }}" >> $GITHUB_STEP_SUMMARY + echo "CLI version ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY echo "Wheel ${{ steps.wheel.outputs.wheel }}" >> $GITHUB_STEP_SUMMARY docker_image: @@ -120,7 +120,7 @@ jobs: context: projects/ecoindex_cli platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.tags }},vvatelot/ecoindex-cli:${{ needs.python_project.outputs.cli_version }},,${{ !env.PRERELEASE && 'vvatelot/ecoindex-cli:latest' || '' }} + tags: ${{ steps.meta.outputs.tags }},vvatelot/ecoindex-cli:${{ needs.python_project.outputs.version }},${{ !contains(inputs.bump, 'pre') && 'vvatelot/ecoindex-cli:latest' || '' }} labels: ${{ steps.meta.outputs.labels }} file: projects/ecoindex_cli/dockerfile build-args: wheel=${{ needs.python_project.outputs.wheel }} @@ -205,8 +205,8 @@ jobs: - name: Commit files uses: EndBug/add-and-commit@v9 with: - message: "chore(cli): Bump CLI version to ${{ needs.python_project.outputs.cli_version }}" - tag: v${{ needs.python_project.outputs.cli_version }}@cli + message: "chore(cli): Bump CLI version to ${{ needs.python_project.outputs.version }}" + tag: v${{ needs.python_project.outputs.version }}@cli tag_push: "--force" push: true @@ -215,29 +215,37 @@ jobs: uses: requarks/changelog-action@v1 with: token: ${{ github.token }} - fromTag: v${{ needs.python_project.outputs.cli_version }}@cli + fromTag: v${{ needs.python_project.outputs.version }}@cli toTag: ${{ steps.last_tag.outputs.tag }} excludeScopes: api changelogFilePath: /tmp/changelog.md - name: Update changelog content with dockerhub links run: | + echo "${{ steps.changelog.outputs.changes }}" > /tmp/changelog.md echo "" >> /tmp/changelog.md echo "### Docker image" >> /tmp/changelog.md echo "" >> /tmp/changelog.md - echo "Docker image have been built and pushed to Docker Hub: [vvatelot/ecoindex-api-backend:${{ needs.python_project.outputs.cli_version }}](https://hub.docker.com/r/vvatelot/ecoindex-cli/tags?page=1&name=${{ needs.python_project.outputs.cli_version }})" >> /tmp/changelog.md + echo "Docker image have been built and pushed to Docker Hub: [vvatelot/ecoindex-api-backend:${{ needs.python_project.outputs.version }}](https://hub.docker.com/r/vvatelot/ecoindex-cli/tags?page=1&name=${{ needs.python_project.outputs.version }})" >> /tmp/changelog.md echo "" >> /tmp/changelog.md echo "### Pypi package" >> /tmp/changelog.md echo "" >> /tmp/changelog.md - echo "Pypi package have been built and pushed to Pypi: [ecoindex-cli:${{ needs.python_project.outputs.cli_version }}](https://pypi.org/project/ecoindex-cli/${{ needs.python_project.outputs.cli_version }}/)" >> /tmp/changelog.md + echo "Pypi package have been built and pushed to Pypi: [ecoindex-cli:${{ needs.python_project.outputs.version }}](https://pypi.org/project/ecoindex-cli/${{ needs.python_project.outputs.version }}/)" >> /tmp/changelog.md - name: Create Release + id: create_release uses: ncipollo/release-action@v1 with: allowUpdates: true prerelease: ${{ env.PRERELEASE }} makeLatest: true - name: "CLI: v${{ needs.python_project.outputs.cli_version }}" - tag: v${{ needs.python_project.outputs.cli_version }}@cli + name: "CLI: v${{ needs.python_project.outputs.version }}" + tag: v${{ needs.python_project.outputs.version }}@cli token: ${{ github.token }} bodyFile: /tmp/changelog.md + + - name: Notify to Mattermost + if: ${{ !env.PRERELEASE }} + run: | + echo -e "{\"icon_url\":\"https://icon-library.com/images/github-icon-png/github-icon-png-29.jpg\",\"text\":\":tada: Une nouvelle release a été publiée pour le projet **${{ github.repository }}: v${{ needs.python_project.outputs.version }}** :tada:\n\nPlus d'infos ici: ${{ steps.create_release.outputs.html_url }}\"}" > mattermost.json + curl -X POST -H 'Content-Type: application/json' -d @mattermost.json ${{ secrets.MATTERMOST_RELEASE_URL }} diff --git a/.github/workflows/build_publish_compute.yml b/.github/workflows/build_publish_compute.yml index ab55274..e0318c3 100644 --- a/.github/workflows/build_publish_compute.yml +++ b/.github/workflows/build_publish_compute.yml @@ -179,12 +179,14 @@ jobs: - name: Update changelog content with dockerhub links run: | + echo "${{ steps.changelog.outputs.changes }}" > /tmp/changelog.md echo "" >> /tmp/changelog.md echo "### Pypi package" >> /tmp/changelog.md echo "" >> /tmp/changelog.md echo "Pypi package have been built and pushed to Pypi: [ecoindex-compute:${{ needs.python_project.outputs.compute_version }}](https://pypi.org/project/ecoindex-compute/${{ needs.python_project.outputs.compute_version }}/)" >> /tmp/changelog.md - name: Create Release + id: create_release uses: ncipollo/release-action@v1 with: allowUpdates: true @@ -194,3 +196,9 @@ jobs: tag: v${{ needs.python_project.outputs.compute_version }}@compute token: ${{ github.token }} bodyFile: /tmp/changelog.md + + - name: Notify to Mattermost + if: ${{ !env.PRERELEASE }} + run: | + echo "{\"icon_url\":\"https://icon-library.com/images/github-icon-png/github-icon-png-29.jpg\",\"text\":\":tada: Une nouvelle release a été publiée pour le projet **${{ github.repository }}: v${{ needs.python_project.outputs.compute_version }}** :tada:\n\nPlus d'infos ici: ${{ steps.create_release.outputs.html_url }}\"}" > mattermost.json + curl -X POST -H 'Content-Type: application/json' -d @mattermost.json ${{ secrets.MATTERMOST_RELEASE_URL }} diff --git a/.github/workflows/build_publish_scraper.yml b/.github/workflows/build_publish_scraper.yml index a4adc1a..6273d6d 100644 --- a/.github/workflows/build_publish_scraper.yml +++ b/.github/workflows/build_publish_scraper.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest outputs: wheel: ${{ steps.wheel.outputs.wheel }} - scraper_version: ${{ steps.version.outputs.scraper_version }} + version: ${{ steps.version.outputs.version }} steps: - name: Check out the repo uses: actions/checkout@v4 @@ -71,15 +71,15 @@ jobs: - name: Output version id: version - run: echo "scraper_version=$(task scraper:poetry:version-short)" >> $GITHUB_OUTPUT + run: echo "version=$(task scraper:poetry:version-short)" >> $GITHUB_OUTPUT - name: Output wheel id: wheel - run: echo "wheel=ecoindex_scraper-${{ steps.version.outputs.scraper_version }}-py3-none-any.whl" >> $GITHUB_OUTPUT + run: echo "wheel=ecoindex_scraper-${{ steps.version.outputs.version }}-py3-none-any.whl" >> $GITHUB_OUTPUT - name: Output summary run: | - echo "Scraper version ${{ steps.version.outputs.scraper_version }}" >> $GITHUB_STEP_SUMMARY + echo "Scraper version ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY echo "Wheel ${{ steps.wheel.outputs.wheel }}" >> $GITHUB_STEP_SUMMARY pypi_package: @@ -162,8 +162,8 @@ jobs: - name: Commit files uses: EndBug/add-and-commit@v9 with: - message: "chore(scraper): Bump scraper version to ${{ needs.python_project.outputs.scraper_version }}" - tag: v${{ needs.python_project.outputs.scraper_version }}@scraper + message: "chore(scraper): Bump scraper version to ${{ needs.python_project.outputs.version }}" + tag: v${{ needs.python_project.outputs.version }}@scraper tag_push: "--force" push: true @@ -172,25 +172,33 @@ jobs: uses: requarks/changelog-action@v1 with: token: ${{ github.token }} - fromTag: v${{ needs.python_project.outputs.scraper_version }}@scraper + fromTag: v${{ needs.python_project.outputs.version }}@scraper toTag: ${{ steps.last_tag.outputs.tag }} excludeScopes: api,cli changelogFilePath: /tmp/changelog.md - name: Update changelog content with dockerhub links run: | + echo "${{ steps.changelog.outputs.changes }}" > /tmp/changelog.md echo "" >> /tmp/changelog.md echo "### Pypi package" >> /tmp/changelog.md echo "" >> /tmp/changelog.md - echo "Pypi package have been built and pushed to Pypi: [ecoindex-scraper:${{ needs.python_project.outputs.scraper_version }}](https://pypi.org/project/ecoindex-scraper/${{ needs.python_project.outputs.scraper_version }}/)" >> /tmp/changelog.md + echo "Pypi package have been built and pushed to Pypi: [ecoindex-scraper:${{ needs.python_project.outputs.version }}](https://pypi.org/project/ecoindex-scraper/${{ needs.python_project.outputs.version }}/)" >> /tmp/changelog.md - name: Create Release + id: create_release uses: ncipollo/release-action@v1 with: allowUpdates: true prerelease: ${{ env.PRERELEASE }} makeLatest: true - name: "Scraper: v${{ needs.python_project.outputs.scraper_version }}" - tag: v${{ needs.python_project.outputs.scraper_version }}@scraper + name: "Scraper: v${{ needs.python_project.outputs.version }}" + tag: v${{ needs.python_project.outputs.version }}@scraper token: ${{ github.token }} bodyFile: /tmp/changelog.md + + - name: Notify to Mattermost + if: ${{ !env.PRERELEASE }} + run: | + echo -e "{\"icon_url\":\"https://icon-library.com/images/github-icon-png/github-icon-png-29.jpg\",\"text\":\":tada: Une nouvelle release a été publiée pour le projet **${{ github.repository }}: v${{ needs.python_project.outputs.version }}** :tada:\n\nPlus d'infos ici: ${{ steps.create_release.outputs.html_url }}\"}" > mattermost.json + curl -X POST -H 'Content-Type: application/json' -d @mattermost.json ${{ secrets.MATTERMOST_RELEASE_URL }} diff --git a/bases/ecoindex/backend/VERSION b/bases/ecoindex/backend/VERSION index 1809198..b22fc0e 100644 --- a/bases/ecoindex/backend/VERSION +++ b/bases/ecoindex/backend/VERSION @@ -1 +1 @@ -3.4.0 +3.4.1a0 diff --git a/components/ecoindex/compute/VERSION b/components/ecoindex/compute/VERSION index d50359d..a00dd3d 100644 --- a/components/ecoindex/compute/VERSION +++ b/components/ecoindex/compute/VERSION @@ -1 +1 @@ -5.5.0 +5.8.0a0 diff --git a/projects/ecoindex_api/pyproject.toml b/projects/ecoindex_api/pyproject.toml index c18b70f..9c58297 100644 --- a/projects/ecoindex_api/pyproject.toml +++ b/projects/ecoindex_api/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ecoindex_api" -version = "3.4.0" +version = "3.4.1a0" description = "REST API to expose Ecoindex" authors = ['Vincent Vatelot '] license = "Creative Commons BY-NC-ND" diff --git a/projects/ecoindex_compute/pyproject.toml b/projects/ecoindex_compute/pyproject.toml index b1835e7..9f17da3 100644 --- a/projects/ecoindex_compute/pyproject.toml +++ b/projects/ecoindex_compute/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ecoindex_compute" -version = "5.5.0" +version = "5.8.0a0" readme = "README.md" description = "Ecoindex module provides a simple way to measure the Ecoindex score based on the 3 parameters: The DOM elements of the page, the size of the page and the number of external requests of the page" authors = ['Vincent Vatelot ']