-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 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,33 @@ | ||
# This workflow is agnostic to branches. Only maintain on develop branch. | ||
# To add/remove versions just modify the matrix. | ||
|
||
name: Create weekly release pull requests | ||
on: | ||
schedule: | ||
# 13:00 UTC -> 7pm IST on every alternate Tuesday | ||
- cron: '0 13 * * 2/2' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
stable-release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: ["14", "15"] | ||
|
||
steps: | ||
- uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/{owner}/{repo}/pulls | ||
owner: frappe | ||
repo: payments | ||
title: |- | ||
"chore: release v${{ matrix.version }}" | ||
body: "Automated weekly release." | ||
base: version-${{ matrix.version }} | ||
head: develop | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
|
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,28 @@ | ||
name: Generate Semantic Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Entire Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Setup dependencies | ||
run: | | ||
npm install @semantic-release/git @semantic-release/exec --no-save | ||
pip install toml-cli | ||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"branches": [ | ||
"main" | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{ | ||
"breaking": true, | ||
"release": false | ||
} | ||
] | ||
}, | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": 'toml set --toml-path pyproject.toml project.version ${nextRelease.version}' | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["pyproject.toml"], | ||
"message": "chore(release): bumped to v${nextRelease.version}" | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} |