File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Ship it
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ ship-it :
8
+ name : Ship it
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
12
+ with :
13
+ # Ensure full history is fetched to have a clear
14
+ # path between next and master
15
+ fetch-depth : 0
16
+ ref : next
17
+
18
+ - name : Check master can fast-forward to next
19
+ run : |
20
+ git fetch origin master
21
+ if ! git merge-base --is-ancestor master next; then
22
+ echo "::error::master cannot be fast-forwarded to next. Aborting."
23
+ exit 1
24
+ fi
25
+ - name : Log commits to ship
26
+ run : git log master..next --oneline
27
+
28
+ - name : Move master to next branch
29
+ run : |
30
+ git checkout master
31
+ git reset --hard next
32
+
33
+ - name : Push updated master to origin
34
+ run : |
35
+ git push origin master
36
+ env :
37
+ GITHUB_TOKEN : ${{ secrets.SHIP_IT_TOKEN }}
You can’t perform that action at this time.
0 commit comments