diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0e53dc7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish to NPM + +on: + release: + types: [created] +jobs: + deploy: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: ./.github/workflows/build.yml + with: + node-version: 18.x + - name: Deploy package + if: github.ref == 'refs/heads/main' + run: npm publish --dry-run + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/vue-class-migrator.yml b/.github/workflows/vue-class-migrator.yml index 4412da2..72d4743 100644 --- a/.github/workflows/vue-class-migrator.yml +++ b/.github/workflows/vue-class-migrator.yml @@ -1,10 +1,7 @@ name: CI on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + [push, pull_request] jobs: build: runs-on: ubuntu-latest @@ -26,9 +23,4 @@ jobs: - name: Test code run: npm test - name: Build package - run: npm run build - - name: Deploy package - if: github.ref == 'refs/heads/main' - run: npm publish --dry-run - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + run: npm run build \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d81f32..bc67a89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.0.1] - 2023-08-XX TODO +## [0.0.1] - 2023-08-08 ### Added - Initial release. \ No newline at end of file diff --git a/package.json b/package.json index ef1a677..8b14580 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "vue-class-migrator", "version": "0.0.1", + "author": "Victor Cuena Garcia ", "description": "CLI tool to help migrating vue class components to vue 3 compatible components.", "bin": { "vue-class-migrator": "./dist/index.js" @@ -8,14 +9,14 @@ "engines": { "node": "18" }, + "files": ["dist"], "scripts": { "migrate": "ts-node src/index.ts", "build": "npx tsc", "lint": "eslint src", "test": "jest" }, - "license": "MIT", - "author": "Victor Cuena Garcia", + "license": "Apache-2.0", "homepage": "https://github.com/getyourguide/vue-class-migrator#readme", "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index d37fd60..ab94304 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,5 +10,5 @@ "moduleResolution": "node", "lib": ["es2021"] }, - "exclude": ["src/__tests__"] + "exclude": ["src/__tests__", "src/__mocks__"] }