From 380d4ded70734bc910099e89789d9209e8aaed95 Mon Sep 17 00:00:00 2001 From: ponlawat-w Date: Sat, 25 Nov 2023 14:44:40 +0700 Subject: [PATCH] 0.2.1 - Updated GitHub actions to tag --- .github/workflows/publish.yml | 14 +++++++++++++- .github/workflows/unit-tests.yml | 16 +++------------- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4a22f93..adcfce6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Setup Node @@ -20,6 +20,12 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ + - name: Get package.json + id: get-package + run: echo PACKAGE=$(cat ./package.json) >> $GITHUB_OUTPUT + - name: Get package version + id: get-package-version + run: echo VERSION="${{ fromJson(steps.get-package.outputs.PACKAGE).version }}" >> $GITHUB_OUTPUT - name: Install run: npm ci - name: Build @@ -28,3 +34,9 @@ jobs: run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Tag + run: | + git config --global user.name "ponlawat-w" + git config --global user.email "ponlawat_w@outlook.co.th" + git tag -fa "v${{ steps.get-package-version.outputs.VERSION }}" -m "v${{ steps.get-package-version.outputs.VERSION }}" + git push --force origin v${{ steps.get-package-version.outputs.VERSION }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 611eef7..fee5191 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -2,28 +2,18 @@ name: Unit Tests on: workflow_call jobs: unit-tests: - strategy: - fail-fast: true - matrix: - node: [16, 18, 20] - name: Unit Tests Node ${{ matrix.node }} + name: Unit Tests runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Setup Node uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 20 - name: Install run: npm ci - name: Test run: npm run test - unit-tests-finished: - name: Unit Tests Finished - needs: unit-tests - runs-on: ubuntu-latest - steps: - - run: exit 0 diff --git a/package-lock.json b/package-lock.json index 673c12c..8d66533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ol-osmoverpass", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ol-osmoverpass", - "version": "0.2.0", + "version": "0.2.1", "license": "ISC", "devDependencies": { "happy-dom": "^12.10.3", diff --git a/package.json b/package.json index df3a184..40a891d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ol-osmoverpass", "type": "module", - "version": "0.2.0", + "version": "0.2.1", "description": "OverLayers vector layer source for OpenStreetMap elements using Overpass API", "main": "dist/index.js", "keywords": [