mirror of
https://github.com/frappe/bench.git
synced 2025-01-06 23:44:03 +00:00
chore: Add Semantic Release
This commit is contained in:
parent
f43ff04809
commit
0b925a3838
28
.github/workflows/release.yml
vendored
Normal file
28
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v5.x
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Set-up semantic-release plugins
|
||||
run: npm install @semantic-release/git @semantic-release/exec --no-save
|
||||
- name: Set-up python build env
|
||||
run: pip install wheel twine
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
|
||||
TEST_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
|
||||
run: npx semantic-release
|
25
.releaserc
Normal file
25
.releaserc
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"branches": ["v5.x"],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
["@semantic-release/exec", {
|
||||
"prepareCmd": 'sed -ir "s/[0-9]*\.[0-9]*\.[0-9]*/${nextRelease.version}/" bench/__init__.py'
|
||||
}],
|
||||
["@semantic-release/exec", {
|
||||
"prepareCmd": "python setup.py bdist_wheel --universal"
|
||||
}],
|
||||
["@semantic-release/git", {
|
||||
"assets": ["bench/__init__.py"],
|
||||
"message": "chore(release): Bumped to Version ${nextRelease.version}\n\n${nextRelease.notes}"
|
||||
}],
|
||||
["@semantic-release/github", {
|
||||
"assets": [
|
||||
{"path": "dist/*"},
|
||||
]
|
||||
}],
|
||||
["@semantic-release/exec", {
|
||||
"publishCmd": "python -m twine upload -r testpypi dist/* -u $TEST_PYPI_USERNAME -p $TEST_PYPI_PASSWORD"
|
||||
}]
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user