Skip to content

Commit

Permalink
Configure deployment mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
victorcuena committed Aug 8, 2023
1 parent e814b1e commit e80ecfc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
12 changes: 2 additions & 10 deletions .github/workflows/vue-class-migrator.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
[push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -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 }}
run: npm run build
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"name": "vue-class-migrator",
"version": "0.0.1",
"author": "Victor Cuena Garcia <[email protected]>",
"description": "CLI tool to help migrating vue class components to vue 3 compatible components.",
"bin": {
"vue-class-migrator": "./dist/index.js"
},
"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",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"moduleResolution": "node",
"lib": ["es2021"]
},
"exclude": ["src/__tests__"]
"exclude": ["src/__tests__", "src/__mocks__"]
}

0 comments on commit e80ecfc

Please sign in to comment.