1+ name : Create release
2+
3+ on : [workflow_dispatch]
4+
5+ permissions : write-all
6+
7+ jobs :
8+ create-release :
9+ runs-on : ubuntu-22.04
10+
11+ steps :
12+ - uses : actions/checkout@v3
13+
14+ - name : Show all artifacts
15+ run : |
16+ mkdir artifacts
17+ ls -lart artifacts
18+
19+ - name : Download Ubuntu x86-64 artifacts
20+ uses : dawidd6/action-download-artifact@v2
21+ with :
22+ workflow : ubuntu-compile.yml
23+ path : artifacts
24+ workflow_conclusion : success
25+ skip_unpack : true
26+
27+ - name : Download Ubuntu arm64 artifacts
28+ uses : dawidd6/action-download-artifact@v2
29+ with :
30+ workflow : docker-compile-ubuntu.yml
31+ path : artifacts
32+ workflow_conclusion : success
33+ skip_unpack : true
34+
35+ - name : Download MacOS 11.7 artifacts
36+ uses : dawidd6/action-download-artifact@v2
37+ with :
38+ workflow : macos-11.7-compile.yml
39+ path : artifacts
40+ workflow_conclusion : success
41+ skip_unpack : true
42+
43+ - name : Download MacOS 12.6 artifacts
44+ uses : dawidd6/action-download-artifact@v2
45+ with :
46+ workflow : macos-12.6-compile.yml
47+ path : artifacts
48+ workflow_conclusion : success
49+ skip_unpack : true
50+
51+ - name : Download Windows artifacts
52+ uses : dawidd6/action-download-artifact@v2
53+ with :
54+ workflow : win-2019-compile.yml
55+ path : artifacts
56+ workflow_conclusion : success
57+ skip_unpack : true
58+
59+ - name : Show all artifacts
60+ run : |
61+ tree artifacts
62+
63+ # create release
64+
65+ - name : Read Changelog.md and use it as a body of new release
66+ id : read_release
67+ shell : bash
68+ run : |
69+ r=$(cat Changelog.md)
70+ r="${r//'%'/'%25'}"
71+ r="${r//$'\n'/'%0A'}"
72+ r="${r//$'\r'/'%0D'}"
73+ echo "::set-output name=CHANGELOG_BODY::$r"
74+
75+ - name : Get current date
76+ id : date
77+ run : echo "::set-output name=date::$(date +'%Y.%m')"
78+
79+ - name : Get registration token
80+ id : getRegToken
81+ run : |
82+ curl -X POST -H \"Accept: application/vnd.github+json\" -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/neodix42/HardTestDevelopment/actions/runners/registration-token
83+
84+ - name : Create release
85+ id : create_release
86+ uses : actions/create-release@v1
87+ env :
88+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89+ with :
90+ tag_name : v${{ steps.date.outputs.date }}
91+ release_name : v${{ steps.date.outputs.date }}
92+ body : |
93+ ${{ steps.read_release.outputs.CHANGELOG_BODY }}
94+ draft : false
95+ prerelease : false
96+
97+ - name : Upload Windows 2019 artifacts
98+ uses : svenstaro/upload-release-action@v2
99+ with :
100+ repo_token : ${{ secrets.GITHUB_TOKEN }}
101+ file : artifacts/ton-win-binaries.zip
102+ asset_name : ton-windows-2019-x86-64.zip
103+ tag : v${{ steps.date.outputs.date }}
104+
105+ - name : Upload MacOS 11.7 x86-64 artifacts
106+ uses : svenstaro/upload-release-action@v2
107+ with :
108+ repo_token : ${{ secrets.GITHUB_TOKEN }}
109+ file : artifacts/ton-macos-11.7.zip
110+ asset_name : ton-macos-11.7-x86-64.zip
111+ tag : v${{ steps.date.outputs.date }}
112+
113+ - name : Upload MacOS 12.6 x86-64 artifacts
114+ uses : svenstaro/upload-release-action@v2
115+ with :
116+ repo_token : ${{ secrets.GITHUB_TOKEN }}
117+ file : artifacts/ton-macos-12.6.zip
118+ asset_name : ton-macos-12.6-x86-64.zip
119+ tag : v${{ steps.date.outputs.date }}
120+
121+ - name : Upload Ubuntu 18.04 x86-64 artifacts
122+ uses : svenstaro/upload-release-action@v2
123+ with :
124+ repo_token : ${{ secrets.GITHUB_TOKEN }}
125+ file : artifacts/ton-binaries-ubuntu-18.04.zip
126+ asset_name : ton-ubuntu-18.04-x86-64.zip
127+ tag : v${{ steps.date.outputs.date }}
128+
129+ - name : Upload Ubuntu 20.04 x86-64 artifacts
130+ uses : svenstaro/upload-release-action@v2
131+ with :
132+ repo_token : ${{ secrets.GITHUB_TOKEN }}
133+ file : artifacts/ton-binaries-ubuntu-20.04.zip
134+ asset_name : ton-ubuntu-20.04-x86-64.zip
135+ tag : v${{ steps.date.outputs.date }}
136+
137+ - name : Upload Ubuntu 22.04 x86-64 artifacts
138+ uses : svenstaro/upload-release-action@v2
139+ with :
140+ repo_token : ${{ secrets.GITHUB_TOKEN }}
141+ file : artifacts/ton-binaries-ubuntu-22.04.zip
142+ asset_name : ton-ubuntu-22.04-x86-64.zip
143+ tag : v${{ steps.date.outputs.date }}
144+
145+ - name : Upload Ubuntu 18.04 arm64 artifacts
146+ uses : svenstaro/upload-release-action@v2
147+ with :
148+ repo_token : ${{ secrets.GITHUB_TOKEN }}
149+ file : artifacts/ton-ubuntu-18.04-arm64.zip
150+ asset_name : ton-ubuntu-18.04-arm64.zip
151+ tag : v${{ steps.date.outputs.date }}
152+
153+ - name : Upload Ubuntu 20.04 arm64 artifacts
154+ uses : svenstaro/upload-release-action@v2
155+ with :
156+ repo_token : ${{ secrets.GITHUB_TOKEN }}
157+ file : artifacts/ton-ubuntu-20.04-arm64.zip
158+ asset_name : ton-ubuntu-20.04-arm64.zip
159+ tag : v${{ steps.date.outputs.date }}
160+
161+ - name : Upload Ubuntu 22.04 arm64 artifacts
162+ uses : svenstaro/upload-release-action@v2
163+ with :
164+ repo_token : ${{ secrets.GITHUB_TOKEN }}
165+ file : artifacts/ton-ubuntu-22.04-arm64.zip
166+ asset_name : ton-ubuntu-22.04-arm64.zip
167+ tag : v${{ steps.date.outputs.date }}
0 commit comments