Skip to content

Commit

Permalink
ci(semantic-release): fix semantic-release config (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Feb 10, 2022
1 parent 8224e45 commit b48f812
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
node-version: 16
- name: Install dependencies
run: npm ci
- name: 🔨 Build package
run: npm run build
- name: 🚀 Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/semantic-release-dry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow runs semantic-release in dry mode to see whether changes in
# semantic-release configurations are working as expected

name: semantic-release (dryRun)

on:
push:
branches:
- 'ci/semantic-release'

jobs:
release-dry:
name: Release (dry)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: 🔨 Build package
run: npm run build
- name: 🚀 Semantic Release (dry)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release --dry-run --branches 'ci/semantic-release'
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"lint": "eslint src/**/*.ts",
"test": "npm run lint && karma start --single-run",
"prepublishOnly": "npm run build",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"semantic-release": "semantic-release"
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},
"author": "Simon Guo <simonguo.2009@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -87,5 +86,19 @@
},
"dependencies": {
"@babel/runtime": "^7.16.0"
},
"release": {
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/npm",
{
"pkgRoot": "lib"
}
]
]
}
}

0 comments on commit b48f812

Please sign in to comment.