Closed panmona closed 2 years ago
It seems that your latest GitHub action went through on your repository? (the version 0.8.0-alpha.1
was published with 0.3.4
?)
Also in your ci.yml, you should not need to perform the restore, build, run anymore on your own, as dotnet-releaser run
should handle this entirely (it automatically do a publish only if there is a tag, otherwise it is a regular build). You should have something like this:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET 6.0 🧳
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Restore, Build, Tests, Publish (on tag) 🚀
shell: bash
run: |
dotnet tool install --global dotnet-releaser
dotnet-releaser run --github-token "${{secrets.GITHUB_TOKEN}}" --github-token-extra "${{secrets.TOKEN_GITHUB}}" src/dotnet-releaser.toml
Notice that there is --github-token
which is using the default GITHUB_TOKEN
created by GitHub Action, and the --github-token-extra
with TOKEN_GITHUB
that should be used for creating repository outside of your repo (e.g homebrew)
Thanks for taking a look. I'm not quite sure I understand how this tag got pushed, I didn't create it. Did dotnet-releaser push it? Why is that?
Thanks for making me aware that I can change the pipeline to this simpler version, which I will do, but I assume it won't change something about this behavior. Quick question about that: Would I need to provide the path to the sln file for the Tests to be automatically detected?
Thanks for taking a look. I'm not quite sure I understand how this tag got pushed, I didn't create it. Did dotnet-releaser push it? Why is that?
You pushed a tag likely, dotnet-releaser
doesn't do that.
Thanks for making me aware that I can change the pipeline to this simpler version, which I will do, but I assume it won't change something about this behavior.
No, it's just that now dotnet-releaser
is handling the full build pipeline (build, test, coverage, packaging...)
Quick question about that: Would I need to provide the path to the sln file for the Tests to be automatically detected?
If the test is part of the solution, it should find it automatically. If it is not, you can add it as a list in [msbuild] project = ["your.sln", "your/test.csproj"]
I think the push of this tag was caused by the fact that I mistakenly still used 'dotnet-releaser publish ...' instead of 'dotnet-releaser run ...'.
I now updated the pipeline, as recommended, to the following:
name: ci
on:
push:
paths-ignore:
- 'README.md'
- 'RELEASE.md'
- 'CONTRIBUTING.md'
pull_request:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET 6.0 🧳
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Restore, Build, Tests, Publish (on tag) 🚀
run: |
dotnet tool install --global dotnet-releaser --version "0.3.*"
dotnet-releaser run --github-token "${{secrets.GITHUB_TOKEN}}" --github-token-extra "${{secrets.TOKEN_GITHUB}}" src/dotnet-releaser.toml
I now receive the following error:
2022/03/02 22:30:40.737 info: [57] The configured homebrew destination repository is `panmau/homebrew-panmau`.
2022/03/02 22:30:40.737 warn: [58] Warning, publishing a new Homebrew formula requires to use --github-token-extra. Using --github-token as a fallback but it might fail!
2022/03/02 22:30:40.889 info: [59] Homebrew repository found panmau/homebrew-panmau
2022/03/02 22:30:41.024 info: [60] Updating Homebrew Formula panmau/homebrew-panmau
Unexpected error Resource not accessible by integration
Error: Process completed with exit code 1.
I don't quite understand why this is happening. I provided github-token-extra, it is the same as before I updated dotnet-releaser but still it doesn't seem to correctly detect that it is there. It seems that the homebrew update is the step where it's failing. Do you have an idea what could be happening here?
I don't quite understand why this is happening. I provided github-token-extra, it is the same as before I updated dotnet-releaser but still it doesn't seem to correctly detect that it is there. It seems that the homebrew update is the step where it's failing. Do you have an idea what could be happening here?
It is a stupid bug. Fixed by commit e4513d174ba838da54eebc332bdecd14fc048735. Should be available soon in 0.3.5+
Thanks for fixing this 💛 I now reran the pipeline but still receive this error:
2022/03/03 19:36:55.867 info: [57] The configured homebrew destination repository is `panmau/homebrew-panmau`.
2022/03/03 19:36:56.003 info: [58] Homebrew repository found panmau/homebrew-panmau
2022/03/03 19:36:56.126 info: [59] Updating Homebrew Formula panmau/homebrew-panmau
Unexpected error Resource not accessible by integration
Error: Process completed with exit code 1.
It used the new version:
Tool 'dotnet-releaser' (version '0.3.5') was successfully installed.
And the warning is now gone.
Do you have an idea what this could be?
Do you have an idea what this could be?
Wow, ok, I must be very tired and/or I'm really stupid to fix this bug. This should be hopefully fixed by commit e2e0ac0a26aa407fb5ea5ac668bb35ee9bf28bea and available in 0.3.6. My apologize for this regression.
No worries it happens to the best of us. (the more code you write, the more bugs you write :)) Thanks for the fix, everything works now! 🎉
I upgraded to the latest version of dotnet-releaser, but am now running into the following error when trying to publish a new version:
I tried using checkout-depth: 0 as indicated instead of 5 but it didn't help to solve it.
This is my toml file:
Am I missing anything obvious here that changed from 0.1. to 0.3.? Apart from the version upgrade and different action triggers I didn't change anything with my dotnet-releaser / project setup.
Thanks in advance for your help and continuous improvements of this amazing tool :yellow_heart:
Full build output:
Version Info
dotnet-releaser v0.3.4 .NET SDK v6.0.2 macOS