-
-
Notifications
You must be signed in to change notification settings - Fork 866
Place the built binary on the release page #92
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
Conversation
|
||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think there is not need to delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiantang
The URL is redirected to the master's bin directory.
$ curl -i https://git.io/darwin_air
HTTP/1.1 302 Found
...
Location: https://raw.githubusercontent.com/cosmtrek/air/master/bin/darwin/air
...
The issue of #75 had a problem with committing binaries, so I deleted the bin directory.
So if execute curl -fLo air https://git.io/darwin_air
, will be redirected to a non-existing binary and will get an error.
@@ -13,7 +13,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
steps: | |||
|
|||
- name: Set up Go 1.4 | |||
- name: Set up Go 1.14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ops! my fault
.github/workflows/go.yml
Outdated
@@ -27,3 +27,12 @@ jobs: | |||
|
|||
- name: Test | |||
run: go test -v ./... | |||
|
|||
- name: Run GoReleaser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me test this. I will rely soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiantang OK!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not work. because this job on other pull request or push. we can create a new workflow to do this.
ame: goreleaser
on:
pull_request:
push:
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can separate this part , and i will receive other change in this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way.
There is a way to add it as a separate job to an existing workflow.
This allows the job to run only when the tag is pushed by using the conditional statement (if: startsWith(github.ref, 'refs/tags/v')
).
82d58e3
The advantage of using jobs is that you can define a dependency that will execute a release job if another job (eg build) passes.
ebacc7a
The disadvantage is that the release job is displayed in the pull request check.
(Only displayed, it is always skipped.)
I recommend adding it as a job because it has the following two advantages.
- One workflow file.
- It is possible to define a dependency that a release job is executed when the build job passes.
- Can test and then release the binary.
Which would you like to choose?
If you decide which method to use, I will delete the one that you do not use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@178inaba I test this. it's work! After thinking,I think I want decide choose your recommend way just merge this release as a job. because build job pass is necessary before release.so separate a new file to release is not good. you delete the one I not use. and I will merge this feature to master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using GoReleaser Action.
Fixes #75.