Skip to content

Commit

Permalink
feat(github-actions): rebuild with 3 channels
Browse files Browse the repository at this point in the history
* feat(github-actions): rebuild with 3 channels

* ne test branch
  • Loading branch information
e-picas authored Dec 18, 2023
1 parent 6e6306c commit 7c6fa70
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- master
- master-bootstrap-4
- master-bootstrap-3
- master-bootstrap-5

permissions:
contents: read # for checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

begin_release:
name: "Begin next release"
if: ${{ github.ref_name == 'develop' && github.event_name == 'workflow_dispatch' }}
if: ${{ (github.ref_name == 'develop' || contains(github.ref_name, 'develop-')) && github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ run-name: "Publish a release by merging it to master and deleting the release br

on:
workflow_dispatch:
inputs:
targetBranch:
description: 'Target branch'
required: true
default: 'master'
type: choice
options:
- master
- master-bootstrap-4
- master-bootstrap-5

permissions:
contents: read # for checkout
Expand Down Expand Up @@ -33,17 +43,17 @@ jobs:
- name: Merging release
run: |
git fetch
git rev-parse --verify master && git branch -D master
git checkout --force --track origin/master
git reset --hard origin/master
git rev-parse --verify ${{ inputs.targetBranch }} && git branch -D ${{ inputs.targetBranch }}
git checkout --force --track origin/${{ inputs.targetBranch }}
git reset --hard origin/${{ inputs.targetBranch }}
git merge --no-ff --no-edit --no-commit origin/${{ github.ref_name }}
NEED_COMMIT=$(git diff --name-status --cached --exit-code 1>/dev/null; echo $?;)
if [[ $NEED_COMMIT == 1 ]]
then
git commit -m "ci(${{ github.ref_name }}): merging prepared release"
git push origin master
git push origin ${{ inputs.targetBranch }}
else
echo "> no changes to be commited on master"
echo "> no changes to be commited on ${{ inputs.targetBranch }}"
echo "> no new release to bump"
fi
# delete release branch
Expand Down
22 changes: 15 additions & 7 deletions .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@ branches:
range: "3.x"
channel: "3.x"

- name: "master-bootstrap-3"
range: "1.x"
channel: "1.x"

- name: "master-bootstrap-4"
range: "2.x"
channel: "2.x"
channel: "bootstrap-4"
prerelease: "btst4"
- name: "develop-bootstrap-4"
channel: "bootstrap-4"

- name: "master-bootstrap-5"
channel: "bootstrap-5"
prerelease: "btst5"
- name: "develop-bootstrap-5"
prerelease: "btst5"

- name: "release-*"
prerelease: "alpha"

plugins:
- path: "@semantic-release/commit-analyzer"
- path: "@semantic-release/release-notes-generator"
commit: "-/commit"
commit: "/commit"
- path: "@semantic-release/github"
- path: "@semantic-release/changelog"
changelogFile: "CHANGELOG.md"
Expand All @@ -42,3 +46,7 @@ plugins:
backmergeBranches:
- from: "master"
to: "develop"
- from: "master-bootstrap-4"
to: "develop-bootstrap-4"
- from: "master-bootstrap-5"
to: "develop-bootstrap-5"

0 comments on commit 7c6fa70

Please sign in to comment.