diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..2f9bc9c3cd --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: pull_request + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + check-latest: true + + - name: Install Node.js dependencies + run: npm ci + + - name: Run eslint + run: npm run lint diff --git a/.github/workflows/npmPublish.yml b/.github/workflows/tagAndPublish.yml similarity index 58% rename from .github/workflows/npmPublish.yml rename to .github/workflows/tagAndPublish.yml index 2ca8f70261..dc4aac3016 100644 --- a/.github/workflows/npmPublish.yml +++ b/.github/workflows/tagAndPublish.yml @@ -1,4 +1,4 @@ -name: 'Auto-publish NPM Package' +name: 'Tag and NPM publish' on: push: @@ -21,7 +21,7 @@ jobs: node-version: 'lts/*' check-latest: true - - name: 'Dependencies and tests' + - name: 'Build' run: | npm ci npm run build @@ -30,3 +30,17 @@ jobs: uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} + + - name: Configure Git + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + + - name: Create tag + run: | + version=$(jq -r '.version' package.json) + tag="v$version" + echo "Creating tag: $tag" + + git tag "$tag" + git push origin "$tag" diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4e80f1e1..e2d06079de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v.0.9.2 + +### Added + +- Adding a github workflow for tagging and linting + ## v.0.9.1 ### Added diff --git a/package-lock.json b/package-lock.json index 9b486e9d46..d46b5c4b63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mxenabled/connect-widget", - "version": "0.9.1", + "version": "0.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mxenabled/connect-widget", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", diff --git a/package.json b/package.json index 45011fe390..aa671e75e0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@mxenabled/connect-widget", "description": "A simple ui library for React", - "version": "0.9.1", + "version": "0.9.2", "module": "dist/index.es.js", "types": "dist/index.d.ts", "type": "module",