File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1515
1616 steps :
1717 - uses : actions/checkout@v2
18-
18+
1919 - name : Set release version
2020 run : |
2121 VERSION=${{ github.event.inputs.version }}
2626 git config --global user.name "GitHub Action"
2727 git commit -a -m "Releasing version $VERSION"
2828 git push origin master
29+ git rev-parse HEAD > HEAD
30+
31+ - name : Upload files
32+ uses : actions/upload-artifact@v2
33+ with :
34+ name : artifacts
35+ path : |
36+ HEAD
2937
3038 build :
3139 name : Build
3745 runs-on : ${{ matrix.os }}
3846
3947 steps :
40- - uses : actions/checkout@v2
48+ - name : Download all artifacts
49+ uses : actions/download-artifact@v2
50+
51+ - name : Read HEAD ref
52+ id : head
53+ uses : juliangruber/read-file-action@v1
54+ with :
55+ path : artifacts/HEAD
56+
57+ - name : Check out repository
58+ uses : actions/checkout@v2
59+ with :
60+ ref : ${{ steps.head.outputs.content }}
4161
4262 - name : Set up Java
4363 uses : actions/setup-java@v2
@@ -84,9 +104,20 @@ jobs:
84104 needs : build
85105 runs-on : ubuntu-latest
86106 steps :
107+ # must read HEAD before checkout
108+ - name : Download build artifacts
109+ uses : actions/download-artifact@v2
110+
111+ - name : Read HEAD ref
112+ id : head
113+ uses : juliangruber/read-file-action@v1
114+ with :
115+ path : artifacts/HEAD
116+
87117 - name : Checkout
88118 uses : actions/checkout@v2
89119 with :
120+ ref : ${{ steps.head.outputs.content }}
90121 fetch-depth : 0
91122
92123 - name : Download build artifacts
Original file line number Diff line number Diff line change 1- 12.3.0
1+ 12.3.0-SNAPSHOT
You can’t perform that action at this time.
0 commit comments