Skip to content

Commit

Permalink
Prepare for initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed Nov 7, 2023
1 parent e70e2e7 commit 4c37095
Show file tree
Hide file tree
Showing 20 changed files with 1,932 additions and 153 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Default owners
* @croct-tech/js
* @croct-tech/javascript-developer

# GitHub configurations
/.github/ @croct-tech/infra
23 changes: 23 additions & 0 deletions .github/workflows/check-commit-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Commit style

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
push:
branches:
- master
- 'dev/*'

jobs:
check-commit-style:
runs-on: ubuntu-latest
steps:
- name: Check
uses: mristin/[email protected]
with:
allow-one-liners: 'true'
skip-body-check: 'true'
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
name: Release
name: Release deploy

on:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
deploy-release:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
node-version: 16
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_PACKAGES_TOKEN }}" >> ~/.npmrc
npm ci
rm -rf ~/.npmrc
Expand All @@ -43,14 +44,10 @@ jobs:
if: ${{ github.event.release.prerelease }}
run: |-
cd build
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm publish --access public --tag next
- name: Publish release to NPM
if: ${{ !github.event.release.prerelease }}
run: |-
cd build
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm publish --access public
17 changes: 0 additions & 17 deletions .github/workflows/release-drafter.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/send-guidelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
> about the change.
☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in **50 characters or less using the imperative mood.**
Happy coding! 🎉
Happy coding! 🎉
2 changes: 1 addition & 1 deletion .github/workflows/update-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- name: Update release draft
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ on:
- synchronize
- opened

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
security-checks:
runs-on: ubuntu-latest
check-vulnerabilities:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
node-version: 16

- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -34,19 +38,19 @@ jobs:
- name: Check dependency vulnerabilities
run: |-
npm i -g [email protected]
npx check-audit --omit dev
npx check-audit
validate:
runs-on: ubuntu-latest
validate-code:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
node-version: 16

- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -58,17 +62,17 @@ jobs:
- name: Check compilation errors
run: npm run validate

lint:
runs-on: ubuntu-latest
check-code-style:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
node-version: 16

- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -79,30 +83,3 @@ jobs:

- name: Check coding standard violations
run: npm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: npm ci

- uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm test
coverageLocations:
./coverage/lcov.info:lcov
Loading

0 comments on commit 4c37095

Please sign in to comment.