From 7e6ae6e53e14724e140b3fd0b2e5aaf2571b566b Mon Sep 17 00:00:00 2001 From: lowzonenose Date: Thu, 31 Mar 2022 15:08:09 +0200 Subject: [PATCH 1/2] Ajout template sur le draft_changelog + reset avec github actions de release --- .github/CHANGELOG_TEMPLATE.md | 21 +++++++++++++++ .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ DRAFT_CHANGELOG.md | 9 ++----- 3 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 .github/CHANGELOG_TEMPLATE.md diff --git a/.github/CHANGELOG_TEMPLATE.md b/.github/CHANGELOG_TEMPLATE.md new file mode 100644 index 000000000..cfc60e76e --- /dev/null +++ b/.github/CHANGELOG_TEMPLATE.md @@ -0,0 +1,21 @@ +# SDK Geoportail 2D/3D, version __VERSION__ + +**__DATE__ : version __VERSION__** + +> Release SDK Geoportail 2D/3D + +## Summary + +## Changelog + +* [Added] + +* [Changed] + +* [Removed] + +* [Fixed] + +* [Deprecated] + +* [Security] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1048fdf5..13e60f72c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -179,6 +179,24 @@ jobs: id: get_version run: echo ::set-output name=VERSION::$(echo ${GITHUB_REF##*/}) + - name: Get Package.json value + id: get_package_value + run: | + echo ::set-output name=DATE::$(cat package.json | perl -MJSON -0ne 'my $DS = decode_json $_; my $field = 'date'; print $DS->{$field};' | sed -e 's/\//\\\//g') + echo ::set-output name=VERSION::$(cat package.json | perl -MJSON -0ne 'my $DS = decode_json $_; my $field = 'version'; print $DS->{$field};') + + - name: Create ChangeLog + run: | # cf. http://fahdshariff.blogspot.com/2012/12/sed-mutli-line-replacement-between-two.html + sed -i 's/__VERSION__/${{ steps.get_package_value.outputs.VERSION }}/g' DRAFT_CHANGELOG.md + sed -i 's/__DATE__/${{ steps.get_package_value.outputs.DATE }}/g' DRAFT_CHANGELOG.md + + - name: Upload ChangeLog artifacts + if: github.event_name == 'push' && contains(github.ref, '/tags/') # Only for tags ! + uses: actions/upload-artifact@v2 + with: + name: changelog + path: DRAFT_CHANGELOG.md + - name: Create Release id: create_release uses: actions/create-release@v1.1.2 @@ -270,3 +288,33 @@ jobs: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_GEOPORTAL_TOKEN }} + + changelog: + if: github.event_name == 'push' && contains(github.ref, '/tags/') # Only for tags ! + needs: [create_release, publish_package] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + repository: IGNF/geoportal-sdk + ref: develop + token: ${{ secrets.ADMIN_GEOPORTAL_TOKEN }} + + - name: Download ChangeLog artifacts + uses: actions/download-artifact@v2 + with: + name: changelog + + - name: Reset draft changelog + run: | + rm DRAFT_CHANGELOG.md + cp .github/CHANGELOG_TEMPLATE.md DRAFT_CHANGELOG.md + + - name: Clean and publish + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add -A + git commit -m "reset DRAFT_CHANGELOG" + git push --force diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index 6af55832c..cfc60e76e 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -1,22 +1,17 @@ -# SDK Geoportail 2D/3D, version 3.3.11 +# SDK Geoportail 2D/3D, version __VERSION__ -**23/03/2022 : version 3.3.11** +**__DATE__ : version __VERSION__** > Release SDK Geoportail 2D/3D ## Summary -Utilisation du service d'isochrone v2 - ## Changelog * [Added] * [Changed] - - READMESDK-3D : mention du control de boostrelief - - utilisation service d'isochrone v2 (#92) - * [Removed] * [Fixed] From c3ed60a6c92e77648128fdc0a37d611021e8f5e3 Mon Sep 17 00:00:00 2001 From: lowzonenose Date: Thu, 31 Mar 2022 15:42:01 +0200 Subject: [PATCH 2/2] Preparation release-3.3.12 --- DEPENDENCIES.md | 12 +++---- DRAFT_CHANGELOG.md | 2 ++ package.json | 10 +++--- scripts/release/package-SDK2D.json | 50 +++++++++++++++--------------- scripts/release/package-SDK3D.json | 44 +++++++++++++------------- 5 files changed, 60 insertions(+), 58 deletions(-) diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index a001dc522..9b7edf6c7 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -1,13 +1,13 @@ -# DEPENDENCIES (17/01/2022) +# DEPENDENCIES (31/03/2022) -* geoportal-extensions-openlayers@3.2.8 -└── geoportal-access-lib@3.0.5 +* geoportal-extensions-openlayers@3.2.11 +└── geoportal-access-lib@3.1.0 -* geoportal-extensions-itowns@2.3.5 -└── geoportal-access-lib@3.0.5 +* geoportal-extensions-itowns@2.3.6 +└── geoportal-access-lib@3.1.0 * "itowns" -└── "itowns@2.33.0" +└── "itowns@2.37.0" * "openlayers" └── "openlayers@6.9.0 diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index cfc60e76e..6d50095ea 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -6,6 +6,8 @@ ## Summary +Mise à jour du package des Extensions OpenLayers en 3.2.11 ([release notes](https://github.com/IGNF/geoportal-extensions/releases/tag/ol-3.2.11)) + ## Changelog * [Added] diff --git a/package.json b/package.json index 925e1f833..41711b5e1 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "geoportal-sdk", - "version": "3.3.11", - "date": "23/03/2022", - "SDK2DVersion": "3.3.11", - "SDK3DVersion": "3.3.11", + "version": "3.3.12", + "date": "31/03/2022", + "SDK2DVersion": "3.3.12", + "SDK3DVersion": "3.3.12", "description": "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries", "main": "dist/2d/GpSDK2D-src.js, dist/3d/GpSDK3d-src.js", "module": "src/SDK2D.js, src/SDK3D.js", @@ -73,7 +73,7 @@ "expose-loader": "^0.7.5", "fs-extra": "^9.0.0", "geoportal-extensions-itowns": "2.3.6", - "geoportal-extensions-openlayers": "3.2.10", + "geoportal-extensions-openlayers": "3.2.11", "handlebars": "^4.7.5", "handlebars-layouts": "^3.1.4", "html-webpack-plugin": "^4.0.4", diff --git a/scripts/release/package-SDK2D.json b/scripts/release/package-SDK2D.json index 5f161f038..b2612a370 100644 --- a/scripts/release/package-SDK2D.json +++ b/scripts/release/package-SDK2D.json @@ -1,39 +1,39 @@ { + "license" : "CECILL-B", + "directories" : {}, + "scripts" : {}, + "module" : "src/SDK2D.js", + "bugs" : { + "url" : "https://github.com/IGNF/geoportal-sdk/issues" + }, "repository" : { "type" : "git", "url" : "https://github.com/IGNF/geoportal-sdk.git" }, - "bugs" : { - "url" : "https://github.com/IGNF/geoportal-sdk/issues" + "main" : "dist/GpSDK2D-src.js", + "description" : "French Geoportal SDK based on OpenLayers (2D)", + "version" : "3.3.12", + "date" : "31/03/2022", + "keywords" : [ + "openlayers", + "geoportail", + "webservice", + "javascript" + ], + "dependencies" : { + "node-fetch" : "^2.6.1", + "geoportal-extensions-openlayers" : "3.2.11", + "ol" : "6.9.0", + "xmldom" : "^0.1.27" }, + "author" : "IGNF", + "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html", "name" : "@ignf-geoportal/sdk-2d", - "date" : "11/02/2022", - "version" : "3.3.8", - "scripts" : {}, "files" : [ "dist/", "src/", "LICENCE.md", "README.md", "package.json" - ], - "author" : "IGNF", - "dependencies" : { - "xmldom" : "^0.1.27", - "node-fetch" : "^2.6.1", - "ol" : "6.9.0", - "geoportal-extensions-openlayers" : "3.2.8" - }, - "directories" : {}, - "keywords" : [ - "openlayers", - "geoportail", - "webservice", - "javascript" - ], - "description" : "French Geoportal SDK based on OpenLayers (2D)", - "module" : "src/SDK2D.js", - "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html", - "main" : "dist/GpSDK2D-src.js", - "license" : "CECILL-B" + ] } diff --git a/scripts/release/package-SDK3D.json b/scripts/release/package-SDK3D.json index ef112215e..e32503146 100644 --- a/scripts/release/package-SDK3D.json +++ b/scripts/release/package-SDK3D.json @@ -1,12 +1,29 @@ { + "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html", + "bugs" : { + "url" : "https://github.com/IGNF/geoportal-sdk/issues" + }, + "license" : "CECILL-B", + "name" : "@ignf-geoportal/sdk-3d", + "repository" : { + "type" : "git", + "url" : "https://github.com/IGNF/geoportal-sdk.git" + }, + "scripts" : {}, + "module" : "src/SDK3D.js", "dependencies" : { - "itowns" : "2.33.0", - "geoportal-extensions-openlayers" : "3.2.8", - "geoportal-extensions-itowns" : "2.3.5", + "geoportal-extensions-itowns" : "2.3.6", + "ol" : "6.9.0", + "itowns" : "2.37.0", "xmldom" : "^0.1.27", "node-fetch" : "^2.6.1", - "ol" : "6.9.0" + "geoportal-extensions-openlayers" : "3.2.11" }, + "author" : "IGNF", + "main" : "dist/GpSDK3D-src.js", + "date" : "31/03/2022", + "directories" : {}, + "version" : "3.3.12", "keywords" : [ "openlayers", "itowns", @@ -14,7 +31,6 @@ "webservice", "javascript" ], - "version" : "3.3.8", "files" : [ "dist/", "src/", @@ -22,21 +38,5 @@ "README.md", "package.json" ], - "repository" : { - "type" : "git", - "url" : "https://github.com/IGNF/geoportal-sdk.git" - }, - "main" : "dist/GpSDK3D-src.js", - "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html", - "scripts" : {}, - "description" : "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries", - "bugs" : { - "url" : "https://github.com/IGNF/geoportal-sdk/issues" - }, - "module" : "src/SDK3D.js", - "author" : "IGNF", - "directories" : {}, - "license" : "CECILL-B", - "date" : "11/02/2022", - "name" : "@ignf-geoportal/sdk-3d" + "description" : "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries" }