Skip to content

Commit

Permalink
release: replace mikeal/merge-release with semantic-release (#94)
Browse files Browse the repository at this point in the history
* release: replace mikeal/merge-release with semantic-release

Signed-off-by: Rui Chen <rui@chenrui.dev>

* add creds

Signed-off-by: Rui Chen <rui@chenrui.dev>

* no need to build twice for one change

Signed-off-by: Rui Chen <rui@chenrui.dev>

* token should be `NPM_TOKEN`

Signed-off-by: Rui Chen <rui@chenrui.dev>

* revert build trigger change

Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
chenrui333 authored Apr 11, 2022
1 parent 206fb84 commit d870201
Show file tree
Hide file tree
Showing 3 changed files with 2,754 additions and 37 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
COVERALLS_REPO_TOKEN: '${{ secrets.COVERALLS_REPO_TOKEN }}'
COVERALLS_GIT_COMMIT: '${{ github.sha }}'
COVERALLS_GIT_BRANCH: '${{ github.ref }}'

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
Expand Down Expand Up @@ -58,8 +59,5 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: mikeal/merge-release@master
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish
run: yarn run semantic-release
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"build": "tsc --build",
"precommit": "pretty-quick --staged",
"prepublish": "tsc",
"semantic-release": "semantic-release",
"test": "jest --coverage",
"test:watch": "jest --watch"
},
Expand All @@ -20,6 +21,13 @@
"peerDependencies": {
"graphql": "^14.0.0 || ^15.0.0"
},
"release": {
"branches": [
"main",
"alpha",
"beta"
]
},
"devDependencies": {
"@types/jest": "^27.4.0",
"coveralls": "^3.0.1",
Expand All @@ -28,6 +36,7 @@
"jest": "^27.4.7",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"semantic-release": "^19.0.2",
"ts-jest": "^27.1.2",
"typescript": "^4.5.4"
},
Expand Down
Loading

0 comments on commit d870201

Please sign in to comment.