-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: autorelease with github actions
- Loading branch information
Showing
7 changed files
with
95 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18.x | ||
- name: Install pkg globally | ||
run: npm install -g pkg | ||
- name: Install dependencies | ||
run: npx ci | ||
- name: Install semantic-release extra plugins | ||
run: npm install -D semantic-release@22.0.12 @semantic-release/exec @semantic-release/changelog @semantic-release/git @semantic-release/github | ||
- name: Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: npx semantic-release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
TODO.md | ||
/musicbee-navidrome-sync.exe | ||
/dist/ | ||
/.dist/ | ||
/MusicBee_Export.csv | ||
/navidrome.db | ||
/backups/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
module.exports = { | ||
branches: ['master'], | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
{ | ||
preset: 'eslint', | ||
releaseRules: [ | ||
{ scope: 'no-release', release: false }, | ||
{ type: 'chore', release: 'patch' }, | ||
{ type: '', release: 'patch' } | ||
] | ||
}, | ||
[ | ||
'@semantic-release/release-notes-generator', | ||
{ | ||
changelogTitle: 'MBNDS CHANGELOG' | ||
} | ||
], | ||
'@semantic-release/changelog', | ||
[ | ||
'@semantic-release/npm', | ||
{ | ||
npmPublish: false | ||
} | ||
], | ||
[ | ||
'@semantic-release/exec', | ||
{ | ||
publishCmd: 'npm run build ${nextRelease.version}' | ||
} | ||
], | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
assets: [{ path: '.dist/musicbee-navidrome-sync_${nextRelease.version}.exe', label: 'MBNDS v${nextRelease.version}' }] | ||
} | ||
], | ||
[ | ||
'@semantic-release/git', | ||
{ | ||
message: 'chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', | ||
assets: ['package.json', 'CHANGELOG.md'] | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set -e | ||
VERSION=${1:-$(node -p "require('./package.json').version")} | ||
|
||
rm -rf .dist | ||
mkdir -p .dist | ||
cp -r index.js package*.json lib .dist | ||
cd .dist | ||
npm install --omit=dev | ||
|
||
pkg -c package.json index.js -o musicbee-navidrome-sync_${VERSION}.exe |