Skip to content

Commit 0b27296

Browse files
Fix rake publish to be compatible with nightly and latest
1 parent 84bc40a commit 0b27296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tasks/packaging.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ desc "Publish artifacts as a GitHub Release"
155155
task :publish, [:tag] do |t, args|
156156
RubyWasm::Toolchain.check_executable("gh")
157157

158-
nightly = /-\d{4}-\d{2}-\d{2}-a$/.match?(args[:tag])
158+
nightly = /^\d{4}-\d{2}-\d{2}-.$/.match?(args[:tag])
159159
files = RELASE_ARTIFACTS.flat_map do |artifact|
160160
Dir.glob("release/#{artifact}/*")
161161
end
@@ -170,7 +170,7 @@ task :publish, [:tag] do |t, args|
170170
npm_tag = nightly ? "next" : "latest"
171171
sh_or_warn %Q(npm publish --tag #{npm_tag} #{tarball})
172172
end
173-
sh %Q(gh release create #{args[:tag]} --title #{args[:tag]} --notes-file release/note.md --prerelease #{files.join(" ")})
173+
sh %Q(gh release create #{args[:tag]} --title #{args[:tag]} --notes-file release/note.md #{nightly ? "--prerelease" : ""} #{files.join(" ")})
174174
end
175175

176176
def sh_or_warn(*cmd)

0 commit comments

Comments
 (0)