From 890e9085f6cf16970cff05d6ab7ae33ac7f41f8f Mon Sep 17 00:00:00 2001 From: James Milner Date: Sun, 12 Jan 2025 18:15:24 +0000 Subject: [PATCH] chore(terra-draw): add release actions for all adapters (#408) --- ...ra-draw-arcgis-adapter-dry-run-release.yml | 41 +++++++++++++++ .../terra-draw-arcgis-adapter-release.yml | 51 +++++++++++++++++++ ...aw-google-maps-adapter-dry-run-release.yml | 41 +++++++++++++++ ...terra-draw-google-maps-adapter-release.yml | 51 +++++++++++++++++++ ...a-draw-leaflet-adapter-dry-run-release.yml | 41 +++++++++++++++ .../terra-draw-leaflet-adapter-release.yml | 51 +++++++++++++++++++ ...draw-mapbox-gl-adapter-dry-run-release.yml | 41 +++++++++++++++ .../terra-draw-mapbox-gl-adapter-release.yml | 51 +++++++++++++++++++ ...aw-maplibre-gl-adapter-dry-run-release.yml | 41 +++++++++++++++ ...terra-draw-maplibre-gl-adapter-release.yml | 51 +++++++++++++++++++ ...raw-openlayers-adapter-dry-run-release.yml | 41 +++++++++++++++ .../terra-draw-openlayers-adapter-release.yml | 51 +++++++++++++++++++ ...raw.yml => terra-draw-release-dry-run.yml} | 2 +- ...-terra-draw.yml => terra-draw-release.yml} | 3 +- 14 files changed, 555 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/terra-draw-arcgis-adapter-dry-run-release.yml create mode 100644 .github/workflows/terra-draw-arcgis-adapter-release.yml create mode 100644 .github/workflows/terra-draw-google-maps-adapter-dry-run-release.yml create mode 100644 .github/workflows/terra-draw-google-maps-adapter-release.yml create mode 100644 .github/workflows/terra-draw-leaflet-adapter-dry-run-release.yml create mode 100644 .github/workflows/terra-draw-leaflet-adapter-release.yml create mode 100644 .github/workflows/terra-draw-mapbox-gl-adapter-dry-run-release.yml create mode 100644 .github/workflows/terra-draw-mapbox-gl-adapter-release.yml create mode 100644 .github/workflows/terra-draw-maplibre-gl-adapter-dry-run-release.yml create mode 100644 .github/workflows/terra-draw-maplibre-gl-adapter-release.yml create mode 100644 .github/workflows/terra-draw-openlayers-adapter-dry-run-release.yml create mode 100644 .github/workflows/terra-draw-openlayers-adapter-release.yml rename .github/workflows/{dry-run-release-terra-draw.yml => terra-draw-release-dry-run.yml} (96%) rename .github/workflows/{release-terra-draw.yml => terra-draw-release.yml} (93%) diff --git a/.github/workflows/terra-draw-arcgis-adapter-dry-run-release.yml b/.github/workflows/terra-draw-arcgis-adapter-dry-run-release.yml new file mode 100644 index 00000000..f5f0ce8b --- /dev/null +++ b/.github/workflows/terra-draw-arcgis-adapter-dry-run-release.yml @@ -0,0 +1,41 @@ +name: terra-draw-arcgis-adapter Dry-run Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-arcgis-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-arcgis-adapter + run: npm run release:dryrun + \ No newline at end of file diff --git a/.github/workflows/terra-draw-arcgis-adapter-release.yml b/.github/workflows/terra-draw-arcgis-adapter-release.yml new file mode 100644 index 00000000..075478cc --- /dev/null +++ b/.github/workflows/terra-draw-arcgis-adapter-release.yml @@ -0,0 +1,51 @@ +name: terra-draw-arcgis-adapter Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-arcgis-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-arcgis-adapter + run: npm run release + + - name: Push upstream + run: git push origin main + + - name: Push tags upstream + run: git push origin main --tags + + - run: npm publish + working-directory: ./packages/terra-draw-arcgis-adapter + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/terra-draw-google-maps-adapter-dry-run-release.yml b/.github/workflows/terra-draw-google-maps-adapter-dry-run-release.yml new file mode 100644 index 00000000..714cf442 --- /dev/null +++ b/.github/workflows/terra-draw-google-maps-adapter-dry-run-release.yml @@ -0,0 +1,41 @@ +name: terra-draw-google-maps-adapter Dry-run Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-google-maps-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-google-maps-adapter + run: npm run release:dryrun + \ No newline at end of file diff --git a/.github/workflows/terra-draw-google-maps-adapter-release.yml b/.github/workflows/terra-draw-google-maps-adapter-release.yml new file mode 100644 index 00000000..1d9a06cb --- /dev/null +++ b/.github/workflows/terra-draw-google-maps-adapter-release.yml @@ -0,0 +1,51 @@ +name: terra-draw-google-maps-adapter Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-google-maps-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-google-maps-adapter + run: npm run release + + - name: Push upstream + run: git push origin main + + - name: Push tags upstream + run: git push origin main --tags + + - run: npm publish + working-directory: ./packages/terra-draw-google-maps-adapter + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/terra-draw-leaflet-adapter-dry-run-release.yml b/.github/workflows/terra-draw-leaflet-adapter-dry-run-release.yml new file mode 100644 index 00000000..6ee6e147 --- /dev/null +++ b/.github/workflows/terra-draw-leaflet-adapter-dry-run-release.yml @@ -0,0 +1,41 @@ +name: terra-draw-leaflet-adapter Dry-run Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-leaflet-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-leaflet-adapter + run: npm run release:dryrun + \ No newline at end of file diff --git a/.github/workflows/terra-draw-leaflet-adapter-release.yml b/.github/workflows/terra-draw-leaflet-adapter-release.yml new file mode 100644 index 00000000..f0ceb36e --- /dev/null +++ b/.github/workflows/terra-draw-leaflet-adapter-release.yml @@ -0,0 +1,51 @@ +name: terra-draw-leaflet-adapter Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-leaflet-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-leaflet-adapter + run: npm run release + + - name: Push upstream + run: git push origin main + + - name: Push tags upstream + run: git push origin main --tags + + - run: npm publish + working-directory: ./packages/terra-draw-leaflet-adapter + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/terra-draw-mapbox-gl-adapter-dry-run-release.yml b/.github/workflows/terra-draw-mapbox-gl-adapter-dry-run-release.yml new file mode 100644 index 00000000..d3d76e0b --- /dev/null +++ b/.github/workflows/terra-draw-mapbox-gl-adapter-dry-run-release.yml @@ -0,0 +1,41 @@ +name: terra-draw-mapbox-gl-adapter Dry-run Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-mapbox-gl-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-mapbox-gl-adapter + run: npm run release:dryrun + \ No newline at end of file diff --git a/.github/workflows/terra-draw-mapbox-gl-adapter-release.yml b/.github/workflows/terra-draw-mapbox-gl-adapter-release.yml new file mode 100644 index 00000000..ab1b68ed --- /dev/null +++ b/.github/workflows/terra-draw-mapbox-gl-adapter-release.yml @@ -0,0 +1,51 @@ +name: terra-draw-mapbox-gl-adapter Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-mapbox-gl-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-mapbox-gl-adapter + run: npm run release + + - name: Push upstream + run: git push origin main + + - name: Push tags upstream + run: git push origin main --tags + + - run: npm publish + working-directory: ./packages/terra-draw-mapbox-gl-adapter + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/terra-draw-maplibre-gl-adapter-dry-run-release.yml b/.github/workflows/terra-draw-maplibre-gl-adapter-dry-run-release.yml new file mode 100644 index 00000000..3ed655ce --- /dev/null +++ b/.github/workflows/terra-draw-maplibre-gl-adapter-dry-run-release.yml @@ -0,0 +1,41 @@ +name: terra-draw-maplibre-gl-adapter Dry-run Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-maplibre-gl-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-maplibre-gl-adapter + run: npm run release:dryrun + \ No newline at end of file diff --git a/.github/workflows/terra-draw-maplibre-gl-adapter-release.yml b/.github/workflows/terra-draw-maplibre-gl-adapter-release.yml new file mode 100644 index 00000000..eb32c1db --- /dev/null +++ b/.github/workflows/terra-draw-maplibre-gl-adapter-release.yml @@ -0,0 +1,51 @@ +name: terra-draw-maplibre-gl-adapter Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-maplibre-gl-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-maplibre-gl-adapter + run: npm run release + + - name: Push upstream + run: git push origin main + + - name: Push tags upstream + run: git push origin main --tags + + - run: npm publish + working-directory: ./packages/terra-draw-maplibre-gl-adapter + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/terra-draw-openlayers-adapter-dry-run-release.yml b/.github/workflows/terra-draw-openlayers-adapter-dry-run-release.yml new file mode 100644 index 00000000..44eb7a91 --- /dev/null +++ b/.github/workflows/terra-draw-openlayers-adapter-dry-run-release.yml @@ -0,0 +1,41 @@ +name: terra-draw-openlayers-adapter Dry-run Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-openlayers-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-openlayers-adapter + run: npm run release:dryrun + \ No newline at end of file diff --git a/.github/workflows/terra-draw-openlayers-adapter-release.yml b/.github/workflows/terra-draw-openlayers-adapter-release.yml new file mode 100644 index 00000000..3b27631d --- /dev/null +++ b/.github/workflows/terra-draw-openlayers-adapter-release.yml @@ -0,0 +1,51 @@ +name: terra-draw-openlayers-adapter Release + +permissions: + contents: write + +on: workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TERRA_DRAW_PAT }} + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://registry.npmjs.org" + + - name: Install + run: npm ci + + - name: Update Docs + run: npm run docs + + - name: Run build + working-directory: ./packages/terra-draw-openlayers-adapter + run: npm run build + + - name: Set git credentials + run: | + git config --global user.email "terradraw@githubactions.com" + git config --global user.name "James Milner" + + - name: Release + working-directory: ./packages/terra-draw-openlayers-adapter + run: npm run release + + - name: Push upstream + run: git push origin main + + - name: Push tags upstream + run: git push origin main --tags + + - run: npm publish + working-directory: ./packages/terra-draw-openlayers-adapter + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/dry-run-release-terra-draw.yml b/.github/workflows/terra-draw-release-dry-run.yml similarity index 96% rename from .github/workflows/dry-run-release-terra-draw.yml rename to .github/workflows/terra-draw-release-dry-run.yml index 22fd02c2..ec17ab5f 100644 --- a/.github/workflows/dry-run-release-terra-draw.yml +++ b/.github/workflows/terra-draw-release-dry-run.yml @@ -1,4 +1,4 @@ -name: Dry-run release terra-draw +name: terra-draw Dry-run Release permissions: contents: write diff --git a/.github/workflows/release-terra-draw.yml b/.github/workflows/terra-draw-release.yml similarity index 93% rename from .github/workflows/release-terra-draw.yml rename to .github/workflows/terra-draw-release.yml index 2daa508f..f1fb32d0 100644 --- a/.github/workflows/release-terra-draw.yml +++ b/.github/workflows/terra-draw-release.yml @@ -1,4 +1,4 @@ -name: Run release terra-draw +name: terra-draw Release permissions: contents: write @@ -46,5 +46,6 @@ jobs: run: git push origin main --tags - run: npm publish + working-directory: ./packages/terra-draw env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file