Skip to content

Commit

Permalink
adding release and test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinvardar committed Nov 15, 2023
1 parent e1848d2 commit 2798af7
Show file tree
Hide file tree
Showing 4 changed files with 1,566 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Publish to NPM
on:
release:
types: [created]
name: build-test
on: push
jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -15,6 +13,3 @@ jobs:
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: release
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vardario/cognito-client",
"version": "0.1.9",
"version": "0.0.0-development",
"description": "",
"license": "MIT",
"author": "Sahin Vardar",
Expand Down Expand Up @@ -42,6 +42,7 @@
"lint-staged": "^13.2.2",
"prettier": "^2.8.8",
"prettier-package-json": "^2.8.0",
"semantic-release": "^22.0.7",
"testcontainers": "^9.0.0",
"typescript": "^5.1.3",
"vitest": "^0.31.0"
Expand Down
Loading

0 comments on commit 2798af7

Please sign in to comment.