Skip to content

Commit

Permalink
chore(cd): Release workflow (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion authored Jan 28, 2024
1 parent 17f93f9 commit 2b2de1d
Show file tree
Hide file tree
Showing 4 changed files with 2,668 additions and 46 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
workflow_dispatch:

concurrency:
group: release
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
uses: ./.github/workflows/ci.yml

release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
issues: write
pull-requests: write
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- run: yarn install --immutable
- run: yarn build
- run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 10 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/semantic-release",
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"semantic-release-yarn",
"@semantic-release/github"
]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"check": "yarn compile && yarn lint && yarn test",
"compile": "tsc",
"lint": "eslint . --report-unused-disable-directives",
"release": "semantic-release",
"test": "NODE_ENV=test mocha"
},
"packageManager": "[email protected]",
Expand Down Expand Up @@ -61,6 +62,8 @@
"react": "18.2.0",
"react-native": "^0.73.2",
"react-test-renderer": "^18.2.0",
"semantic-release": "^23.0.0",
"semantic-release-yarn": "^3.0.2",
"sinon": "^17.0.1",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
Expand Down
Loading

0 comments on commit 2b2de1d

Please sign in to comment.