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

Deploy to GitHub releases #9

Merged
merged 4 commits into from Nov 18, 2017

Conversation

Projects
None yet
2 participants
@joneshf
Collaborator

joneshf commented Nov 18, 2017

The linux part of #8.

What this does

When you create a tag, it will run a build on Travis. After a successful build where the environment variable DEPLOY_GITHUB_RELEASE is true, it will tar up the dhall-to-json and dhall-to-yaml binaries and upload them to GH under the tag.

See this tag: https://github.com/joneshf/dhall-json/releases/tag/1.0.8-joneshf-testing-2 and the corresponding build: https://travis-ci.org/joneshf/dhall-json/jobs/304052754

What this doesn't do

This doesn't have OSX wired up to build yet. If it's alright with you, I'd like to tackle that in a separate PR. I don't know how much work it will be to get it building on travis.

What you need to do to make things work

This uses a personal access token to allow Travis to create Releases and upload artifacts.

You need to:

  1. Generate new token for Travis to use: https://github.com/settings/tokens.
  2. The scope it needs is repo:public: https://docs.travis-ci.com/user/deployment/releases/#Authenticating-with-an-OAuth-token.
  3. Set that token as the Environment Variable GITHUB_OAUTH_TOKEN in the travis settings: https://travis-ci.org/joneshf/dhall-json/settings

After that, any tag you push should create a GitHub Release.

joneshf added some commits Nov 18, 2017

Only deploy from certain builds
We don't want to deploy every combination in the matrix.
Instead, choose a specific build to deploy to GitHub.
Create an archive of the binaries
In preparation for releasing both linux and osx,
we create an archive that is named according to the platform.
@joneshf

This comment has been minimized.

Collaborator

joneshf commented Nov 18, 2017

Sorry, opened against the wrong repo 😅.

@joneshf joneshf closed this Nov 18, 2017

Only deploy when a tag exists
We only want specific versions of binaries released.
Without this check, every commit to master would create a release.
@joneshf

This comment has been minimized.

Collaborator

joneshf commented Nov 18, 2017

Actually, pretend like I never closed this...

@joneshf joneshf reopened this Nov 18, 2017

@joneshf

This comment has been minimized.

Collaborator

joneshf commented Nov 18, 2017

Updated the original comment with some information. Let me know if there's anything else you need from me, or any changes you'd like to make.

@Gabriel439 Gabriel439 merged commit f8c61b7 into dhall-lang:master Nov 18, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Gabriel439

This comment has been minimized.

Collaborator

Gabriel439 commented Nov 18, 2017

I'm test driving it right now! :)

@Gabriel439

This comment has been minimized.

Collaborator

Gabriel439 commented Nov 18, 2017

Looks like it worked: https://github.com/dhall-lang/dhall-json/releases/tag/1.0.8

Thanks for doing this! :)

@joneshf joneshf deleted the joneshf:deploy-to-github-releases branch Nov 18, 2017

@joneshf

This comment has been minimized.

Collaborator

joneshf commented Nov 18, 2017

Sweet!

I'll try to get OSX working soon (unless you or someone else wants to).

@joneshf joneshf referenced this pull request Nov 21, 2017

Closed

Binary Releases? #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment