Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload assets to the release associated with given tagName #895

Merged
merged 17 commits into from
Dec 10, 2024

Conversation

Chiichen
Copy link
Contributor

@Chiichen Chiichen commented Aug 23, 2024

Enable uploading assets to the target release associated with the given tagName (if exist).

TL;DR

The basic motivation is that I'm using googleapis/release-please github action to release automatically. However, it only provides tagName as output if a release is created successfully. And we can use this rest api to get the corresponding releaseId by the given tagName. That's why I did it.

Test Example

I've apply this action on my project here Chiichen/JinhsiStudio. This is the related action and the release. It seems to be working well

Let me know if it's an acceptable enhancement. And I will add some docs for it (README or somewhere else?)

@Chiichen
Copy link
Contributor Author

I use minor version since It maintains forward compatibility.

@Chiichen
Copy link
Contributor Author

Chiichen commented Dec 8, 2024

@FabianLars Friendly ping. Any comments for it?

@FabianLars
Copy link
Member

yeah sorry, i wanted to look at this for ages but there's always some bs coming in between 🙃

I hope i can give it a proper look on monday or tuesday (will be on vacation after that), but the thing i already noticed is that there's quite a lot of duplicate code now (the json upload stuff). The release checks&creation should be its own block.

@Chiichen
Copy link
Contributor Author

Chiichen commented Dec 9, 2024

yeah sorry, i wanted to look at this for ages but there's always some bs coming in between 🙃

I hope i can give it a proper look on monday or tuesday (will be on vacation after that), but the thing i already noticed is that there's quite a lot of duplicate code now (the json upload stuff). The release checks&creation should be its own block.

I got u. I will do some changes later

@Chiichen Chiichen force-pushed the feat-upload-with-tag-name branch from 3d08ab3 to 4102ca2 Compare December 10, 2024 09:48
@Chiichen
Copy link
Contributor Author

@FabianLars sorry for so many ci failures :) I believe it's working now.Do you have time to give it a proper look now?

@FabianLars
Copy link
Member

no worries, thanks for resolving them :)

i'm working on another pr rn but will get to yours right after (today)

@FabianLars
Copy link
Member

while trying to refactor it a bit, similar to how create-release has its own function i noticed that create-release basically contains the same code so we can simplify this quite a bit by just making releaseName optional there too. Gonna push a commit in a few :)

@FabianLars
Copy link
Member

this way we also can use the existing draft lookup (not included in getReleaseByTag)

@FabianLars FabianLars merged commit fb76925 into tauri-apps:dev Dec 10, 2024
10 checks passed
Chiichen added a commit to JinhsiStudio/JinhsiStudio that referenced this pull request Dec 11, 2024
…rget release

After tauri-apps/tauri-action#895 . tauri-action support uploading the artifacts to the release associated with the given tagName
Chiichen added a commit to JinhsiStudio/JinhsiStudio that referenced this pull request Dec 11, 2024
After tauri-apps/tauri-action#895 . tauri-action support uploading the artifacts to the release associated with the given tagName
@ChristianPayne
Copy link

ChristianPayne commented Dec 11, 2024

Hey all, just a heads up. My app was building fine up until one of the last two releases of this.
- uses: tauri-apps/tauri-action@v0 was what I was set to and it was grabbing the most up to date major version 0.
I hard coded it back to two releases ago ( - uses: tauri-apps/[email protected]) and I can build again.

What happened?

You can check out my releases here.
Essentially, my v1.0.0 built fine with all files and a latest.json. For some unknown reason, one of the newer versions would not allow the .exe, .sig or latest.json files to be built.
With v1.1.0, I noticed that the files were not there and my updater was not working (no latest.json).
I hard coded the tauri-action script back to v0.5.15 and my files are back. I am completely uneducated as to why or what was changed but I thought I would drop this note here because I see active work on this action.

Let me know if you guys need logs or more info or anything, I can help troubleshoot.

@Chiichen
Copy link
Contributor Author

Chiichen commented Dec 11, 2024

大家好,提醒一下。我的应用程序构建得很好,直到最近两个版本发布。 - uses: tauri-apps/tauri-action@v0这是我设定的,它抓取的是最新的主要版本 0。 我将其硬编码回两个版本之前( - uses: tauri-apps/[email protected]),然后我就可以再次构建了。

发生了什么?

您可以在此处查看我的版本。 基本上,我的版本v1.0.0构建良好,包含所有文件和 latest.json。由于某些未知原因,较新版本之一不允许构建 .exe、.sig 或 latest.json 文件。 使用v1.1.0,我注意到文件不存在,并且我的更新程序无法正常工作(没有 latest.json)。 我将 tauri-action 脚本硬编码回v0.5.15,我的文件又回来了。我完全不知道为什么或更改了什么,但我想在这里写下这条注释,因为我看到有人在积极开展这项行动。

如果你们需要日志或更多信息或任何东西,请告诉我,我可以帮助排除故障。

Can you list out one of failed action(no latest.json) and one of success action?

Maybe you can turn to latest issues. Tons of feedbacks there (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants