-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce dev branch and pipelines (#47)
* feat: introduce dev branch and pipelines * chore: replace git checkout with git switch * chore: remove main to dev update pipeline --------- Co-authored-by: Quake <QuakeEye@users.noreply.GitHub.com>
- Loading branch information
Showing
3 changed files
with
46 additions
and
11 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 @@ | ||
name: Create Pull Request from dev to main | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch All | ||
run: git fetch --all | ||
|
||
- name: Get Latest Tag | ||
id: previoustag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1.4.0 | ||
with: | ||
fallback: v1.0.0 | ||
|
||
- name: Create Dev to Main Pull Request | ||
run: | | ||
git checkout dev | ||
git pull | ||
git switch -c dev-${{ steps.previoustag.outputs.tag }} | ||
git push origin dev-${{ steps.previoustag.outputs.tag }} | ||
gh pr create --base main --head dev-${{ steps.previoustag.outputs.tag }} --title "Merge dev at version ${{ steps.previoustag.outputs.tag }} to main" --body "This PR merges the dev branch at version ${{ steps.previoustag.outputs.tag }} to the main branch." | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
test-build: | ||
|
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,14 @@ | ||
module.exports = { | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/exec" | ||
] | ||
], | ||
"branches": [ | ||
"main" | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/exec" | ||
] | ||
} | ||
], | ||
"branches": [ | ||
{ name: "main" }, | ||
{ name: "dev", channel: "dev", prerelease: true } | ||
] | ||
} |