-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #615 from FOGProject/stable
update-branch
- Loading branch information
Showing
5 changed files
with
85 additions
and
14 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 |
---|---|---|
@@ -1,13 +1,22 @@ | ||
name: Stable Release Step 1 - Create PR | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 10 15 * *" | ||
jobs: | ||
create-release-pull-request: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/stable' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: dev-branch | ||
- name: create pull request | ||
run: gh pr create -B stable -H dev-branch --title "Monthly Release PR - $(date '+%Y-%m-%d')" --body "Monthly pull request for creating the latest stable release from staged security fixes, bug fixes, and minor enhancements." | ||
run: | | ||
echo 'Get version to be released and create PR with that in the name' | ||
system_file="$(git rev-parse --show-toplevel)/packages/web/lib/fog/system.class.php" | ||
tag=$(grep "define('FOG_VERSION'" $system_file | sed "s/.*FOG_VERSION', '\([^']*\)');/\1/") | ||
gh pr create -B stable -H dev-branch --title "Stable Release PR For ${tag} - $(date '+%Y-%m-%d')" --body "Pull Request for creating the latest stable release from staged security fixes, bug fixes, and minor enhancements in dev-branch. Created as needed or monthly on 15th of every month, released once tests are passing" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Stable Release Step 2 - Validate PR | ||
|
||
on: | ||
workflow_dispatch: | ||
# pull_request: | ||
# types: | ||
# - open | ||
# branches: | ||
# - dev-branch | ||
# - stable | ||
|
||
jobs: | ||
Merge-After-All-Tests-Passed: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/stable' | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Merge The PR | ||
run: | | ||
echo 'Get the tag' | ||
git fetch origin dev-branch | ||
git checkout dev-branch | ||
system_file="$(git rev-parse --show-toplevel)/packages/web/lib/fog/system.class.php" | ||
tag=$(grep "define('FOG_VERSION'" $system_file | sed "s/.*FOG_VERSION', '\([^']*\)');/\1/") | ||
git checkout stable | ||
echo "merge the pull request bringing dev-branch into stable"; | ||
gh pr merge dev-branch --squash --subject "Stable Release - ${tag}"; | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# on a monthly pr created from other workflow | ||
# test validity of install | ||
# down the road-test various functions (deploy, capture, API) | ||
# Fix version if needed | ||
# merge pull request with generic commit | ||
# maybe update version if not handled in hook |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Stable Release Step 3 - Tag and Release | ||
|
||
on: | ||
workflow_dispatch: | ||
# pull_request: | ||
# types: | ||
# - closed | ||
|
||
jobs: | ||
Tag-and-release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/stable' | ||
steps: | ||
- name: Check-out code to release | ||
uses: actions/checkout@v4 | ||
- name: Tag and release | ||
run: | | ||
echo 'Find the version to use for the tag, create the release, and sync the dev and stable branches' | ||
echo 'find the version to create as a tag' | ||
system_file="$(git rev-parse --show-toplevel)/packages/web/lib/fog/system.class.php" | ||
tag=$(grep "define('FOG_VERSION'" $system_file | sed "s/.*FOG_VERSION', '\([^']*\)');/\1/") | ||
echo 'create the tag and release...' | ||
gh release create $tag --latest --generate-notes --target stable | ||
echo 'sync dev-branch with stable branch (merge stable into dev-branch)...' | ||
# git config core.hooksPath .githooks #custom githooks not working in github runner | ||
gh pr create -B dev-branch -H stable --title "merge stable - ${tag} into dev" --body "Pull Request for syncing stable release commit back to dev after a release" | ||
gh pr merge stable --merge --subject "merge stable - ${tag} into dev"; | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
# on merge of monthly release pr | ||
# get/calculate current version | ||
# create tag of current version | ||
# create release of new tag | ||
# generate release notes | ||
# send announcements? |