Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
feat: standard release process (#117)
Browse files Browse the repository at this point in the history
* update node and standardize release process

* add codeowners
  • Loading branch information
mpetrunic committed Jun 23, 2022
1 parent b2e598d commit b30043a
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 105 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @beroburny @irubido
96 changes: 0 additions & 96 deletions .github/workflows/cd.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: "14"
cache: yarn
node-version: "16"

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
51 changes: 46 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,62 @@
name: CI

on: [pull_request, push]
on:
push:
branches:
- master
pull_request:
branches:
- '**'

jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
cache: yarn
node-version: "16"
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn run build
- name: Lint
run: yarn run lint
- name: Tests
run: xvfb-run --auto-servernum yarn run test
run: xvfb-run --auto-servernum yarn run test

maybe-release:
name: release
runs-on: ubuntu-latest
needs: [checks]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: google-github-actions/release-please-action@v3 # it will analyze commits and create PR with new version and updated CHANGELOG:md file. On merging it will create github release page with changelog
id: release
with:
release-type: node
package-name: release-please-action
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'

- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

- run: yarn install --frozen-lockfile
if: ${{ steps.release.outputs.release_created }}

- run: yarn build
if: ${{ steps.release.outputs.release_created }}

- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
22 changes: 22 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Semantic PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
chore
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v14
v16

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"metamask",
"dist"
],
"engines": {
"node": "16"
},
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc -p tsconfig.build.json",
Expand Down

0 comments on commit b30043a

Please sign in to comment.