File tree Expand file tree Collapse file tree 3 files changed +68
-0
lines changed Expand file tree Collapse file tree 3 files changed +68
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Trigger excel2md
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ dispatch_event :
10
+ runs-on : ubuntu-latest
11
+ name : Dispatch event
12
+
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v2
16
+
17
+ - name : Get version info
18
+ id : tag
19
+ run : |
20
+ NEXT_VERSION=$(./get_next.sh ${{ github.repository_owner }} excel2xml-input)
21
+ echo "NEXT_VERSION: ${NEXT_VERSION}"
22
+ echo ::set-output name=next-release::${NEXT_VERSION}
23
+
24
+ - name : Create Archive
25
+ id : create-archive
26
+ run : |
27
+ zip -r grupoetra grupoetra/*.xlsx
28
+
29
+ - name : Create Release
30
+ id : create-release
31
+ uses : actions/create-release@v1
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ with :
35
+ tag_name : ${{ steps.tag.outputs.next-release }}
36
+ release_name : ${{ steps.tag.outputs.next-release }}
37
+ draft : false
38
+ prerelease : false
39
+
40
+ - name : Upload Release Asset
41
+ id : upload-release-asset
42
+ uses : actions/upload-release-asset@v1
43
+ env :
44
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
+ with :
46
+ upload_url : ${{ steps.create-release.outputs.upload_url }}
47
+ asset_path : ./grupoetra.zip
48
+ asset_name : grupoetra.zip
49
+ asset_content_type : application/zip
50
+
51
+ - uses : juztcode/repo-ditpatch-action@v1
52
+ with :
53
+ event-type : release_event
54
+ token : ${{ secrets.REPO_TRIGGER_KEY }}
55
+ repository : " ${{ github.repository_owner }}/excel2xml"
56
+ client-payload : ' {"tag": "${{ steps.tag.outputs.next-release }}" }'
Original file line number Diff line number Diff line change
1
+ owner_url=$1
2
+ repo_name=$2
3
+ latest_url=$( wget https://github.com/${owner_url} /${repo_name} /releases/latest --max-redirect=0 2>&1 | grep Location)
4
+ prefix=" Location: https://github.com/${owner_url} /${repo_name} /releases/tag/"
5
+ suffix=" [following]"
6
+ tail=${latest_url# " $prefix " }
7
+ release_version=${tail% " $suffix " }
8
+ major=` echo $release_version | cut -d. -f1`
9
+ minor=` echo $release_version | cut -d. -f2`
10
+ revision=` echo $release_version | cut -d. -f3`
11
+ revision=` expr $revision + 1`
12
+ echo ${major} .${minor} .${revision}
You can’t perform that action at this time.
0 commit comments