diff --git a/README.md b/README.md index 8760a13..9796d0d 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,14 @@ +## Features + +- [x] Rollupjs packaging system with TypeScript by default +- [x] Tslint support +- [x] Husky hooks support +- [x] Conventional release by **standard-version** +- [x] GitHub actions (build, create github release, publish to npm) + ## Installation Make sure `yeoman` is installed diff --git a/generators/app/templates/.github/workflows/create-github-release.yml b/generators/app/templates/.github/workflows/create-github-release.yml new file mode 100644 index 0000000..97743b1 --- /dev/null +++ b/generators/app/templates/.github/workflows/create-github-release.yml @@ -0,0 +1,19 @@ +name: create-github-release + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + create-github-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/create-release@v1 + env: + # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + tag_name: ${{github.ref}} + release_name: Release ${{github.ref}} diff --git a/generators/app/templates/.github/workflows/main.yml b/generators/app/templates/.github/workflows/main.yml new file mode 100644 index 0000000..43bb2dc --- /dev/null +++ b/generators/app/templates/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: main + +on: push + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org + - name: Install dependencies + run: yarn + - name: Analyze source + run: yarn lint + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org + - name: Install dependencies + run: yarn + - name: Build source + run: yarn build diff --git a/generators/app/templates/.github/workflows/publish-npm.yml b/generators/app/templates/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..e7267e0 --- /dev/null +++ b/generators/app/templates/.github/workflows/publish-npm.yml @@ -0,0 +1,27 @@ +name: publish-npm + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org + - name: Install dependencies + run: yarn + - name: Analyze source + run: yarn lint + - name: Build source + run: yarn build + - name: Publish package + run: yarn publish --access public + env: + # Create your own token at https://github.com/organization/repository/settings/secrets + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}