-
Notifications
You must be signed in to change notification settings - Fork 27
106 lines (94 loc) · 4.12 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build, Sign and Release
on:
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'
permissions:
contents: write
jobs:
build-macos:
uses: ./.github/workflows/release_macos.yml
with:
binary_list: api-blockchain-scanner-daemon,api-web-server,dns-server,node-daemon,wallet-address-generator,wallet-cli,wallet-rpc-daemon
secrets: inherit
build-linux:
uses: ./.github/workflows/release_linux.yml
with:
binary_list: api-blockchain-scanner-daemon,api-web-server,dns-server,node-daemon,wallet-address-generator,wallet-cli,wallet-rpc-daemon
secrets: inherit
build-windows:
uses: ./.github/workflows/release_windows.yml
with:
binary_list: api-blockchain-scanner-daemon,api-web-server,dns-server,node-daemon,wallet-address-generator,wallet-cli,wallet-rpc-daemon
secrets: inherit
build-docker:
needs: [build-macos, build-linux, build-windows]
uses: ./.github/workflows/release_docker.yml
secrets: inherit
create-release:
needs: [build-macos, build-linux, build-windows, build-docker]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Generate Hashes
id: generate_hashes
run: |
echo "HASHES<<EOF" >> $GITHUB_OUTPUT
for file in Mintlayer_Node_*/*.dmg Mintlayer_Node_*/*.deb Mintlayer_Node_*/*.rpm Mintlayer_Node_*/*.zip Mintlayer_Node_*/*_Setup.exe; do
if [ -f "$file" ]; then
echo "$(sha256sum $file | awk '{print $1}') $(basename $file)" >> $GITHUB_OUTPUT
fi
done
echo "EOF" >> $GITHUB_OUTPUT
- name: Generate Release Body
id: generate_body
run: |
echo "BODY<<EOF" >> $GITHUB_OUTPUT
echo "Release version ${{ steps.get_version.outputs.VERSION }}" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "This release includes the following packages:" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "macOS:" >> $GITHUB_OUTPUT
echo "- Mintlayer Node GUI (DMG) for Intel and Apple Silicon" >> $GITHUB_OUTPUT
echo "- Mintlayer Node (ZIP) for Intel and Apple Silicon" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "Linux:" >> $GITHUB_OUTPUT
echo "- Mintlayer Node GUI (DEB) for x86_64 and ARM64" >> $GITHUB_OUTPUT
echo "- Mintlayer Node (DEB and TGZ) for x86_64 and ARM64" >> $GITHUB_OUTPUT
echo "- Mintlayer Node GUI (RPM) for x86_64" >> $GITHUB_OUTPUT
echo "- Mintlayer Node (RPM) for x86_64" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "Windows:" >> $GITHUB_OUTPUT
echo "- Mintlayer Node GUI (ZIP) for x64" >> $GITHUB_OUTPUT
echo "- Mintlayer Node GUI Installer (EXE) for x64" >> $GITHUB_OUTPUT
echo "- Mintlayer Node (ZIP) for x86" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "Please download the appropriate package for your system." >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "Docker Images" >> $GITHUB_OUTPUT
echo "Find docker images in the docker hub:" >> $GITHUB_OUTPUT
echo "https://hub.docker.com/u/mintlayer" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "File Hashes (SHA256):" >> $GITHUB_OUTPUT
echo "\`\`\`" >> $GITHUB_OUTPUT
echo "${{ steps.generate_hashes.outputs.HASHES }}" >> $GITHUB_OUTPUT
echo "\`\`\`" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "Mintlayer_Node_*/*.dmg,Mintlayer_Node_*/*.deb,Mintlayer_Node_*/*.rpm,Mintlayer_Node_*/*.zip,Mintlayer_Node_*/*.tar.gz,Mintlayer_Node_*/*_Setup.exe"
artifactErrorsFailBuild: true
name: "Release ${{ steps.get_version.outputs.VERSION }}"
body: ${{ steps.generate_body.outputs.BODY }}
token: ${{ secrets.GITHUB_TOKEN }}