Skip to content

Commit 6ef2c5d

Browse files
authored
Create auto-publish.yaml
1 parent e02e2d8 commit 6ef2c5d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

auto-publish.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
trigger:
3+
- main
4+
5+
jobs:
6+
- job: MergeMainToLive
7+
pool:
8+
vmImage: 'ubuntu-latest'
9+
steps:
10+
- checkout: self
11+
persistCredentials: true
12+
- script: |
13+
git config --global user.name "Mike Jacobs"
14+
git config --global user.email "[email protected]"
15+
git checkout main
16+
git checkout live
17+
git merge main --no-ff --no-commit
18+
if [ $? -eq 0 ]; then
19+
git commit -m "Merged main into live"
20+
git push origin live
21+
else
22+
echo "Error merging main to live"
23+
exit 1
24+
fi
25+
displayName: 'Merge main to live if main has changed'

0 commit comments

Comments
 (0)