diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2eaeb35 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + name: Test, build and release new version + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install dependencies + run: npm ci + + - name: Build Paprika 🌶 + run: npm run build + + - name: Run tests + run: npm test --if-present + + - name: Create release + uses: cycjimmy/semantic-release-action@v3 + with: + dry_run: false + extra_plugins: | + @semantic-release/git + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GIT_AUTHOR_NAME: github-actions + GIT_AUTHOR_EMAIL: github-actions@github.com + GIT_COMMITTER_NAME: github-actions + GIT_COMMITTER_EMAIL: github-actions@github.com + CI: true diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..1e0f143 --- /dev/null +++ b/.releaserc @@ -0,0 +1,15 @@ +{ + "dryRun": true, + "branches": ["master"], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/npm", + [ + "@semantic-release/git", + { + "assets": ["CHANGELOG.md", "package.json", "package-lock.json", "dist", "docs"] + } + ] + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..344c1bf --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ +# Contributing + +Thanks for choosing to contribute to Paprika 🌶! + +You will find here a set of guidelines to follow when contributing to this project. + +## Have A Question? + +Start by filing an issue. The existing committers on this project work to reach consensus around project direction and issue solutions within issue threads (when appropriate). + +## Automated Release + +### Release +Releases are automated and based on [Angular Commit Message Conventions in commits](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-header). + +The commit messages are used to build: + * Release notes + * Changelog updates + * NPM package semver + +### Commit Message Format +We have very precise rules over how the Git commit messages must be formatted. This format leads to a easier read of the commit history. + +Each commit message consists of a header, a body, and a footer. Each must conform to the formats explained below. + +``` +
+ + + +