Skip to content

Commit

Permalink
feat: version 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
santi100a committed Mar 29, 2023
1 parent b33a529 commit e7e4520
Show file tree
Hide file tree
Showing 19 changed files with 469 additions and 140 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: npm # See documentation for possible values
directory: / # Location of package manifests
schedule:
interval: "weekly"
interval: weekly
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'CI failed': '**/*.*'
23 changes: 23 additions & 0 deletions .github/workflows/issue-welcome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Welcome message for issues
on:
issues:
types:
- opened
permissions:
issues: write
jobs:
welcome-author:
runs-on: ubuntu-latest
steps:
- name: Say hi
uses: jungwinter/comment@v1
with:
type: create
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.issue.number }}
body: |
Make sure to comply with the [Code of Conduct](
https://github.com/${{ github.repository }}/blob/main/CODE_OF_CONDUCT.md),
[security policy](https://github.com/${{ github.repository }}/blob/main/SECURITY.md)
and [contribution guidelines](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md)
before contributing to this repo.
38 changes: 0 additions & 38 deletions .github/workflows/main.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/pr-build-failed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Report PR build failed
on:
workflow_call:
inputs:
number:
required: true
type: number
pr-author:
required: true
type: string
jobs:
report-pr-build-failed:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Report the build failed
uses: jungwinter/comment@v1
with:
type: create
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ inputs.number }}
body: |
Hi, @${{ inputs.pr-author }}! I'm afraid the CI check for PR #${{ inputs.number }} has failed!
Don't worry, it'll run again if you commit any changes to this PR.
- name: Label PR as "CI failed"
uses: actions/labeler@v4
with:
sync-label: true
repo-token: ${{ secrets.GITHUB_TOKEN }}

47 changes: 47 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Pull Request check

on:
pull_request:
types:
- edited
- opened
- synchronize
paths:
- src/**/*.*
jobs:
test:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Clone the main repo
run: cd .. && sudo /usr/bin/git clone https://github.com/${{ github.repository }} main && cd -
- name: Check if the PR is acceptable
run: |
diff -q ./tests/ ../main/tests
diff -q ./.github/ ../main/.github
- name: Copy test suites from main repo to PR
run: cp ../main/tests/*.* tests/
- name: Get rid of the main repo's clone
run: sudo rm -rf ../main
- name: Install dependencies
run: yarn
- name: Build code
run: yarn build
- name: Run main test suites
run: yarn test
- name: Report build failed (if any)
if: failure()
uses: ./.github/workflows/pr-build-failed.yml
with:
pr-author: ${{ github.event.pull_request.user.login }}
number: ${{ github.event.pull_request.number }}
23 changes: 23 additions & 0 deletions .github/workflows/pr-welcome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Welcome message for pull requests
on:
pull_request:
types:
- opened

jobs:
say-hi:
runs-on: ubuntu-latest
steps:
- name: Say hi
uses: jungwinter/comment@v1
with:
type: create
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
body: |
Hi, ${{ github.event.pull_request.user.login }}! Welcome to ${{ github.repository }} issues!
Make sure to comply with the [Code of Conduct](
https://github.com/${{ github.repository }}/blob/main/CODE_OF_CONDUCT.md), [security policy](
https://github.com/${{ github.repository }}/blob/main/SECURITY.md) and [contribution guidelines
](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md) before contributing to
this repo.
100 changes: 100 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Continuous Integration (CI)

on:
push:
branches:
- main
paths:
- src/**/*.*

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19.x
always-auth: true

- name: Install dependencies
run: yarn

- name: Build source code
run: yarn build

- name: Run test suites
run: yarn test
release:
permissions:
contents: write
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Generate tag, release name, and body
run: |
TAG_NAME="v$(jq -r '.version' package.json)"
RELEASE_NAME="Release $TAG_NAME"
BODY=$(sed -n "/## Version $(jq -r '.version' package.json | sed 's/\./\\\./g')/,/##/p" CHANGELOG.md | sed '1d;/^##/d')
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
echo "$BODY" >> release.md
- name: Create release
uses: ncipollo/release-action@v1.12.0
with:
allowUpdates: true
tag: ${{ env.TAG_NAME }}
name: ${{ env.RELEASE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
bodyFile: release.md
draft: false
prerelease: false
publish-npm:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 19.x
always-auth: true
- name: Install dependencies
run: yarn
- name: Build code
run: yarn build
- name: Set access tokens
run: |
npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish to NPM
run: yarn publish --access public
publish-gpr:
needs: release
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 19.x
always-auth: true
- name: Install dependencies
run: yarn
- name: Build code
run: yarn build
- name: Set access tokens
run: |
npm set //npm.pkg.github.com/:_authToken ${{ secrets.GPR_AUTH_TOKEN }}
- name: Get ready to publish to GPR
run: |
jq ".name = \"@$REPO\"" package.json > temp.json && mv temp.json package.json
env:
REPO: ${{ github.repository }}
- name: Publish to GPR
run: yarn publish --access public --registry https://npm.pkg.github.com/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"useTabs": true,
"trailingComma": "none",
"semi": true
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## Version 0.0.5
- Fixed, refined, and modified functions.
68 changes: 64 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ response to any instances of unacceptable behavior.
I have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
permanently any contributor for other behaviors that I deem inappropriate,
threatening, offensive, or harmful.

## Scope
Expand All @@ -55,7 +55,67 @@ a project may be further defined and clarified by me.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting me at <santyrojasprieto9+githubissues@gmail.com>.
All complaints will be reviewed and investigated and will result in a response that
reported by contacting me at <santyrojasprieto9+githubissues@gmail.com>. All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. I will maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Further details of specific enforcement policies may be posted separately.
## Enforcement Guidelines

I will follow these Community Impact Guidelines in determining
the consequences for any action I deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from me, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available
at <https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
[Mozilla CoC]: https://github.com/mozilla/diversity
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contribute

## How to contribute

You can [file an issue](https://github.com/santi100a/equal-lib/issues)
or a [pull request](https://github.com/santi100a/equal-lib/pulls).
You can also [start a discussion](https://github.com/santi100a/equal-lib/discussions).

## Contribution rules
You must comply with the [Code of Conduct](CODE_OF_CONDUCT.md) when doing contributions.
Loading

0 comments on commit e7e4520

Please sign in to comment.