Skip to content

Commit

Permalink
fix(cicd): added auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
seekayel committed Nov 25, 2022
1 parent c632248 commit c742411
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/merge_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,3 @@ jobs:
run: |
npm ci
npm run test
- id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.publish.outputs.version }}
release_name: ${{ steps.publish.outputs.version }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release
"on":
push:
branches:
- main
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
- run: npm ci
- run: npm run test
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,10 @@
"dependencies": {
"@aws-sdk/client-dynamodb": "3.82.0",
"@aws-sdk/lib-dynamodb": "3.82.0"
},
"release": {
"branches": [
"main"
]
}
}

0 comments on commit c742411

Please sign in to comment.