From 88d715996bf3d8ebc65069cdaeec97fe67354a76 Mon Sep 17 00:00:00 2001 From: Ferdinand Prantl Date: Fri, 28 Jan 2022 11:45:55 +0100 Subject: [PATCH] chore: Enable CI on GitHub --- .github/package.json | 65 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 35 ++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .github/package.json create mode 100644 .github/workflows/ci.yml diff --git a/.github/package.json b/.github/package.json new file mode 100644 index 0000000..64aa9e6 --- /dev/null +++ b/.github/package.json @@ -0,0 +1,65 @@ +{ + "name": "babel-plugin-amd-checker", + "version": "0.0.2", + "description": "Module format checking plugin for Babel usable in both Node.js the web browser environments.", + "author": { + "name": "Ferdinand Prantl", + "email": "prantlf@gmail.com", + "url": "http://prantl.tk" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/prantlf/babel-plugin-amd-checker/blob/master/LICENSE" + } + ], + "homepage": "https://github.com/prantlf/babel-plugin-amd-checker#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/prantlf/babel-plugin-amd-checker.git" + }, + "bugs": { + "url": "https://github.com/prantlf/babel-plugin-amd-checker/issues" + }, + "engines": { + "node": ">=6" + }, + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "eslint index.js" + }, + "release": { + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + "@semantic-release/npm", + [ + "@semantic-release/github", + { + "failComment": false + } + ], + "@semantic-release/git" + ] + }, + "devDependencies": { + "@semantic-release/changelog": "^6.0.1", + "@semantic-release/git": "^10.0.1", + "eslint": "^8.5.0" + }, + "keywords": [ + "babel-plugin", + "module", + "transform", + "babel", + "plugin", + "requirejs", + "browser", + "amd" + ] +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..557097f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: Test or Release + +on: + - push + - pull_request + +jobs: + test-or-release: + runs-on: ubuntu-latest + steps: + - name: Checkout Sources + uses: actions/checkout@v2 + - name: Install Node + uses: actions/setup-node@v2 + with: + node-version: 'lts/*' + registry-url: 'https://registry.npmjs.org' + - name: Install PNPM + uses: pnpm/action-setup@v2 + with: + version: '>=6' + run_install: | + - args: [--frozen-lockfile, --no-verify-store-integrity] + - name: Test + run: npm test + - name: Coverage + run: pnpx -y codecov + - name: Publish + uses: cycjimmy/semantic-release-action@v2 + with: + semantic_version: 18 + branches: master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}