Skip to content

Commit

Permalink
Github action for beta version publishing on NPM (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlurie authored Nov 18, 2024
1 parent 94d3467 commit eaf0f7c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/format-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,28 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run make
- run: npm publish --access public

- name: Publish NPM package (regular)
if: "!github.event.release.prerelease"
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

- name: Publish NPM package (pre-release)
if: "github.event.release.prerelease"
run: |
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
### Bug Fixes
- The language switching is now more robust and preserves the original formatting from the style (`Map.setPrimaryLangage()`) (https://github.com/maptiler/maptiler-sdk-js/pull/134)

### Others
- Now able to GitHub action a beta on NPM from the GH release creation process
- Updated GH action to v4



## 2.4.1
### Bug Fixes
- The class `AJAXError` is now imported as part of the `maplibregl` namespace (CommonJS limitation from Maplibre GL JS) (https://github.com/maptiler/maptiler-sdk-js/pull/129)
Expand Down

0 comments on commit eaf0f7c

Please sign in to comment.