Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

draft-release.yml 5.8 KB

You have to be logged in to leave a comment. Sign In
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
  1. #
  2. # Make a draft release when tagging
  3. #
  4. # The release assets are automatically downloaded from the GMT FTP server
  5. # and uploaded to GitHub.
  6. #
  7. on:
  8. push:
  9. # Sequence of patterns matched against refs/tags/x.x.x and refs/tags/x.x.xrcx
  10. tags:
  11. # Push events to matching versions, e.g., 6.1.0, 6.1.0rc1
  12. - '[0-9]+.[0-9]+.[0-9]+'
  13. - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
  14. name: Create a Draft Release
  15. jobs:
  16. draft-release:
  17. name: Create a Draft Release
  18. runs-on: macos-latest # Have to use macos because linux sometimes timeouts
  19. steps:
  20. - name: Set GMT version from tag name
  21. # ${GITHUB_REF} is "refs/tags/6.0.0" for tags
  22. # after this step, the GMT version can be used as ${{ env.GMT_VERSION }}
  23. run: echo "GMT_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
  24. # Uncomment the following line for debugging only
  25. # run: echo "GMT_VERSION=${DEBUG_GITHUB_REF##*/}" >> $GITHUB_ENV
  26. - name: Set release or release candidate from GMT version
  27. run: |
  28. if [[ ${{ env.GMT_VERSION }} == [0-9]+.[0-9]+.[0-9]+ ]]; then
  29. echo "GMT_RELEASE=true" >> $GITHUB_ENV
  30. elif [[ ${{ env.GMT_VERSION }} == [0-9]+.[0-9]+.[0-9]+rc[0-9]+ ]]; then
  31. echo "GMT_RELEASE=false" >> $GITHUB_ENV
  32. fi
  33. - name: Download GMT tarballs and installers
  34. run: |
  35. curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg
  36. curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg
  37. curl -O ftp://ftp.soest.hawaii.edu/gmt/gmt-${{ env.GMT_VERSION }}-src.tar.gz
  38. curl -O ftp://ftp.soest.hawaii.edu/gmt/gmt-${{ env.GMT_VERSION }}-src.tar.xz
  39. curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-win64.exe
  40. - name: Download win32 GMT installer
  41. if: ${{ env.GMT_RELEASE }} == 'true'
  42. run: |
  43. curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-win32.exe
  44. - name: Checksum
  45. run: |
  46. shasum -a 256 \
  47. gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg \
  48. gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg \
  49. gmt-${{ env.GMT_VERSION }}-src.tar.gz \
  50. gmt-${{ env.GMT_VERSION }}-src.tar.xz \
  51. gmt-${{ env.GMT_VERSION }}-win64.exe \
  52. > gmt-${{ env.GMT_VERSION }}-checksums.txt
  53. # Display the checksums
  54. cat gmt-${{ env.GMT_VERSION }}-checksums.txt
  55. - name: Win32 Checksum
  56. if: ${{ env.GMT_RELEASE }} == 'true'
  57. run: |
  58. shasum -a 256 \
  59. gmt-${{ env.GMT_VERSION }}-win32.exe \
  60. >> gmt-${{ env.GMT_VERSION }}-checksums.txt
  61. # Display the checksums
  62. cat gmt-${{ env.GMT_VERSION }}-checksums.txt
  63. - name: Create a Draft Release
  64. if: ${{ env.GMT_RELEASE }} == 'true'
  65. id: create_release
  66. uses: softprops/action-gh-release@v1
  67. env:
  68. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  69. with:
  70. name: ${{ env.GMT_VERSION }}
  71. body: |
  72. | **File** | **Description** |
  73. |--------------------------------|-----------------------------------------|
  74. | gmt-${{ env.GMT_VERSION }}-checksums.txt | sha256sum of source and binary packages |
  75. | gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg | macOS bundle (intel) |
  76. | gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg | macOS bundle (arm64) |
  77. | gmt-${{ env.GMT_VERSION }}-src.tar.gz | Source code |
  78. | gmt-${{ env.GMT_VERSION }}-src.tar.xz | Source code |
  79. | gmt-${{ env.GMT_VERSION }}-win32.exe | Windows installer (32bit) |
  80. | gmt-${{ env.GMT_VERSION }}-win64.exe | Windows installer (64bit) |
  81. draft: true
  82. prerelease: false
  83. files: |
  84. gmt-${{ env.GMT_VERSION }}-checksums.txt
  85. gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg
  86. gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg
  87. gmt-${{ env.GMT_VERSION }}-src.tar.gz
  88. gmt-${{ env.GMT_VERSION }}-src.tar.xz
  89. gmt-${{ env.GMT_VERSION }}-win32.exe
  90. gmt-${{ env.GMT_VERSION }}-win64.exe
  91. - name: Create a Draft Release Candidate
  92. if: ${{ env.GMT_RELEASE }} == 'false'
  93. id: create_release_candidate
  94. uses: softprops/action-gh-release@v1
  95. env:
  96. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  97. with:
  98. name: ${{ env.GMT_VERSION }}
  99. body: |
  100. | **File** | **Description** |
  101. |--------------------------------|-----------------------------------------|
  102. | gmt-${{ env.GMT_VERSION }}-checksums.txt | sha256sum of source and binary packages |
  103. | gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg | macOS bundle (intel) |
  104. | gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg | macOS bundle (arm64) |
  105. | gmt-${{ env.GMT_VERSION }}-src.tar.gz | Source code |
  106. | gmt-${{ env.GMT_VERSION }}-src.tar.xz | Source code |
  107. | gmt-${{ env.GMT_VERSION }}-win64.exe | Windows installer (64bit) |
  108. draft: true
  109. prerelease: true
  110. files: |
  111. gmt-${{ env.GMT_VERSION }}-checksums.txt
  112. gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg
  113. gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg
  114. gmt-${{ env.GMT_VERSION }}-src.tar.gz
  115. gmt-${{ env.GMT_VERSION }}-src.tar.xz
  116. gmt-${{ env.GMT_VERSION }}-win64.exe
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...