Skip to content

Commit

Permalink
chore: try semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanregisser committed Oct 26, 2022
1 parent b09a5a9 commit 187e4b1
Show file tree
Hide file tree
Showing 3 changed files with 2,456 additions and 36 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- main
# TODO: remove before merging
- jeanregisser/semantic-release
# ..and any pull request.
pull_request:

Expand Down Expand Up @@ -53,3 +55,34 @@ jobs:
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
publish:
name: Publish to NPM
# TODO: uncomment before merging
# if: github.ref == 'refs/heads/main'
needs:
- check-for-sh
- lint
- test
runs-on: ubuntu-latest
steps:
# actions/checkout MUST come before auth
- uses: actions/checkout@v3
- id: auth
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.MAINNET_SERVICE_ACCOUNT_KEY }}
- id: google-secrets
uses: google-github-actions/get-secretmanager-secrets@v0
with:
secrets: |-
NPM_TOKEN:projects/1027349420744/secrets/NPM_TOKEN
- uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true
- run: yarn
- run: yarn build
- run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ steps.google-secrets.outputs.NPM_TOKEN }}
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "@valora/logging",
"version": "1.0.0",
"version": "0.0.0-semantic-release",
"main": "dist/logging.js",
"typings": "dist/logging.d.ts",
"repository": "https://github.com/valora-inc/logging",
"author": "Valora Inc",
"license": "Apache-2.0",
"private": false,
"engines": {
"node": "^16"
},
Expand All @@ -23,7 +24,8 @@
"test": "jest",
"test:watch": "yarn test --watch",
"test:ci": "yarn test --ci --coverage",
"supercheck": "yarn format && yarn lint:fix && yarn typecheck && yarn test"
"supercheck": "yarn format && yarn lint:fix && yarn typecheck && yarn test",
"release": "yarn semantic-release"
},
"dependencies": {
"@google-cloud/logging": "^10.1.11",
Expand All @@ -43,6 +45,7 @@
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@valora/eslint-config-typescript": "^1.0.1",
"@valora/prettier-config": "^0.0.1",
"conventional-changelog-conventionalcommits": "^5.0.0",
"eslint": "^8.25.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.3",
Expand All @@ -53,11 +56,19 @@
"jest": "^29.2.1",
"mockdate": "^3.0.5",
"prettier": "^2.7.1",
"semantic-release": "^19.0.5",
"shelljs": "^0.8.5",
"supertest": "^6.3.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
},
"prettier": "@valora/prettier-config"
"prettier": "@valora/prettier-config",
"release": {
"branches": [
"main",
"jeanregisser/semantic-release"
],
"preset": "conventionalcommits"
}
}
Loading

0 comments on commit 187e4b1

Please sign in to comment.