8000 Place the built binary on the release page by 178inaba · Pull Request #92 · air-verse/air · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 8 commits into from
Aug 2, 2020

Conversation

178inaba
Copy link
Contributor

Using GoReleaser Action.

Fixes #75.


```bash
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ops! my fault

@@ -27,3 +27,12 @@ jobs:

- name: Test
run: go test -v ./...

- name: Run GoReleaser
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiantang OK!

Copy link
Collaborator

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 }}

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiantang
I added release workflow to GitHub Actions!
3463fcc

Copy link
Contributor Author
@178inaba 178inaba Aug 2, 2020

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.)
スクリーンショット 2020-08-02 21 25 50

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiantang
OK!
I have deleted the release workflow files!
32e83bb

@178inaba 178inaba requested a review from xiantang July 26, 2020 09:49
@xiantang xiantang merged commit 3eda871 into air-verse:master Aug 2, 2020
@178inaba 178inaba deleted the goreleaser branch August 2, 2020 14:37
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.

Binaries shouldn't be committed to VCS
2 participants
0