Skip to content

Commit

Permalink
0.2.1 - Updated GitHub actions to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ponlawat-w committed Nov 25, 2023
1 parent d0f84df commit 380d4de
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ jobs:
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: 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
Expand All @@ -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 "[email protected]"
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 }}
16 changes: 3 additions & 13 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit 380d4de

Please sign in to comment.