Skip to content

Commit

Permalink
feat: initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
frantic1048 committed Nov 8, 2023
1 parent 4ed963d commit dccbb21
Show file tree
Hide file tree
Showing 17 changed files with 33,738 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# compiled code
/dist
23 changes: 23 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
overrides: [
{
files: ['src/**/*.{ts,cts,mts}'],
extends: ['@rightcapital/eslint-config-typescript'],
env: { node: true },
rules: {
'no-void': ['error', { allowAsStatement: true }],
},
},
{
files: ['./*.{js,cjs,mjs}'],
extends: ['@rightcapital/eslint-config-javascript'],
env: { node: true },
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
};
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install

test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install

- name: Lint
run: pnpm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.9.0
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# pnpm managed files
pnpm-lock.yaml

# compiled code
/dist
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 RightCapital

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
# action-beachball-release
Host a GitHub action that automatically creates GitHub release for our beachball managed repos.

<!-- Badges area start -->

[![made by RightCapital](https://img.shields.io/badge/made_by-RightCapital-5070e6)](https://rightcapital.com)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/RightCapitalHQ/action-beachball-release/ci.yaml)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
[![RightCapital frontend style guide](https://img.shields.io/badge/code_style-RightCapital-5c4c64?labelColor=f0ede8)](https://github.com/RightCapitalHQ/frontend-style-guide)

<!-- Badges area end -->

Creates GitHub releases for each [beachball](https://microsoft.github.io/beachball/) created tag.

## Usage

```yaml
name: Release
on:
push:
tags:
# Match tags created by beachball('package-name_v1.0.0' or 'package-scope/package-name_v1.0.0')
- 'package-name_v*'
- '@package-scope/*'
jobs:
release:
runs-on: ubuntu-latest
steps:
# Checkout the repo contents is necessary.
# `action-beachball-release` needs changelog files generated by beachball from the repo.
- uses: actions/checkout@v4

- uses: rightcapitalhq/action-beachball-release@v1
with:
# The beachball created tag name. The action will create a release for this tag.
tag: ${{ github.ref_name }}
# The `repo-url` is used to generate links to the changelog files.
# For example: https://github.com/RightCapitalHQ/action-beachball-release
repo-url: ${{ github.server_url }}/${{ github.repository }}
# The `token` is used to create GitHub releases.
token: ${{ secrets.GITHUB_TOKEN }}
```
## License
[MIT License](LICENSE) © 2023-Present
15 changes: 15 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Beachball release
description: Create GitHub releases for a beachball managed project.
inputs:
tag:
description: Name of the git tag created by beachball, e.g. `package_v1.2.3` or `@scope/package_v1.2.3`
required: true
token:
description: 'GITHUB_TOKEN for creating GitHub release'
required: true
repo-url:
description: 'Repository URL for creating CHANGELOG link, e.g. `github.server_url/github.repository`'
required: true
runs:
using: 'node20'
main: dist/index.js
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
Loading

0 comments on commit dccbb21

Please sign in to comment.