Skip to content

Commit

Permalink
DN-8_add-semantic-release (#32)
Browse files Browse the repository at this point in the history
![Replace me with a new
gif](https://media.giphy.com/media/n3p6JiIG0TzCU/giphy-downsized.gif)

## Description

[//]: # 'Replace "JIRA-ISSUE" in the link below with the Jira Task ex:
DN-000'

[JIRA ticket](https://designaroni.atlassian.net/browse/DN-8)

[//]: # "What changes are made in the pull request? minor, major & chore
or cleanup tasks..."

feat(semantic release): Adds semantic release pkg, release yml workflow,
releaserc json

- Adds github workflow release.yml for master next & test
- `release.yml` contains basic CI steps
- Adds `.releaserc.json` with github and git packages

## Documentation

[//]: # "Provide links to in-house documentation for this work or any
third party documentation used"

NA testing release workflow with merge into `test`

## Impacted areas of code & app functionality

[//]: # "Describe impacted areas and areas affected by this change."

github workflows, semantic release configuration, git tagging

## How to recreate & verify

[//]: # "Neurotically list steps needed to recreate the issue.
Separately list steps to verify the fix or verify that all require
changes satisfy the ticket requirements."

**Steps to recreate:**

NA

**Steps to verify:**

- merge this branch into test, see if semantic release workflow runs

## Checklists

### Pull Request Author

**NA**

I have verified...

- [ ] Recreate / Verification steps can be followed by any reviewer
- [ ] All test and lint checks pass locally
  - [ ] New code includes test coverage
- [x] Environment Deployment checks pass
- [x] Automated code scanning passes quality & coverage checks
- [x] Legacy & comment code cleanup
- [ ] Satisfies ticket requirements
  - [ ] defined or implied code style guide
  - [ ] safely implements third-party documentation
- [ ] Runs error-free
- [x] Effective commit messages
- [ ] User-friendly errors
- [x] Work prevents exposing sensitive information
- [ ] Formal documentation in Jira or README.md

### Code Reviewer:

I have verified...

- [ ] All automated test and lint checks pass
  - [ ] New code includes test coverage
- [ ] Environment Deployment checks pass
- [ ] Automated code scanning passes quality & coverage checks
- [ ] Satisfies ticket requirements
  - [ ] defined or implied code style guide
  - [ ] safely implements third-party documentation
- [ ] Runs error-free
- [ ] Effective commit messages
- [ ] User-friendly errors
- [ ] Work prevents exposing sensitive information
- [ ] Formal documentation in Jira or README.md
  • Loading branch information
Designaroni committed Dec 27, 2022
2 parents 19ef544 + 7334028 commit ce99056
Show file tree
Hide file tree
Showing 5 changed files with 2,128 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## How to recreate & verify

[//]: # "Nuerotically list steps needed to recreate the issue. Seperately list steps to verify the fix or verify that all require changes satisfy the ticket requirements."
[//]: # "Neurotically list steps needed to recreate the issue. Separately list steps to verify the fix or verify that all require changes satisfy the ticket requirements."

**Steps to recreate:**

Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
###
# Run semantic-release only after all tests succeeded!
###

name: Release
on:
push:
branches:
- master
- next
- test
jobs:
release:
name: Release
runs-on: ubuntu-latest
# permissions:
# content: write
# issues: write
# pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16.9.0
- name: Install dependencies
run: yarn install
- name: Lint project
run: yarn lint
# - name: Test project
# run: yarn test
# - name: Build project
# run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
35 changes: 35 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"branches": [
"master",
{
"name": "next",
"prelease": true
},
{
"name": "test",
"prelease": true
}
],
"verifyConditions": [
"@semantic-release/git",
"@semantic-release/github"
],
"prepare": [
{
"path": "@semantic-release/git",
"assets": [
"package.json"
],
"message": "build(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"publish": [
"@semantic-release/github"
],
"success": [
"@semantic-release/github"
],
"fail": [
"@semantic-release/github"
]
}
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"name": "designaroni-next",
"description": "A NextJS Frontend Application",
"author": {
"name": "Ian Roberts"
},
"license": "MIT",
"version": "0.1.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/designaroni/designaroni-next.git"
},
"private": false,
"scripts": {
"local": "yarn dev",
"dev": "next dev",
Expand Down Expand Up @@ -39,6 +48,7 @@
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@commitlint/cz-commitlint": "^17.3.0",
"@semantic-release/git": "^10.0.1",
"@types/node": "17.0.23",
"@types/react": "18.0.0",
"@types/react-dom": "18.0.0",
Expand All @@ -54,6 +64,7 @@
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^8.0.2",
"prettier": "2.6.2",
"semantic-release": "^19.0.5",
"stylelint-config-css-modules": "^4.1.0",
"typescript": "4.6.3"
}
Expand Down
Loading

0 comments on commit ce99056

Please sign in to comment.