mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 09:51:39 +00:00
feat: add automated production release workflow
This commit is contained in:
@@ -32,5 +32,5 @@ jobs:
|
||||
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
r2-bucket: pkljar
|
||||
source-dir: pkl
|
||||
source-dir: config/pkl
|
||||
destination-dir: .
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: PR Merged - Bump Version and Tag
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- develop
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
bump-version-and-tag:
|
||||
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'feature/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Bump version and update changelog
|
||||
uses: commitizen-tools/commitizen-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Push changes and tag
|
||||
run: git push && git push --tags
|
||||
@@ -0,0 +1,45 @@
|
||||
name: Sync Branches
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
sync-branches:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check if tag is on develop or master
|
||||
id: check-branch
|
||||
run: |
|
||||
if git branch -r --contains ${{ github.ref }} | grep -q 'origin/develop\|origin/master'; then
|
||||
echo "SYNC_NEEDED=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "SYNC_NEEDED=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Sync develop to master
|
||||
if: steps.check-branch.outputs.SYNC_NEEDED == 'true'
|
||||
uses: devmasx/merge-branch@master
|
||||
with:
|
||||
type: now
|
||||
from_branch: develop
|
||||
target_branch: master
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Sync master back to develop
|
||||
if: steps.check-branch.outputs.SYNC_NEEDED == 'true'
|
||||
uses: devmasx/merge-branch@master
|
||||
with:
|
||||
type: now
|
||||
from_branch: master
|
||||
target_branch: develop
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user