Add editorconfig + github workflows

This commit is contained in:
Sander Declerck 2025-07-11 17:20:39 +02:00
parent 5eaf6ac3b3
commit 21cdefadde
No known key found for this signature in database
3 changed files with 77 additions and 0 deletions

41
.github/workflows/build-and-release.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: Create Release
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org/"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Set version number
id: get_version
run: |
version="${{ github.ref_name }}"
echo "tag=$version" >> $GITHUB_OUTPUT
- name: Set the version
run: npm --no-git-tag-version version ${{ steps.get_version.outputs.tag }}
- name: Install dependencies
run: npm ci
- name: Publish to npm
run: |
echo "Publishing version ${{ steps.get_version.outputs.tag }} to NPM"
npm publish --access public
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}