Closed Teteros closed 6 years ago
Ignore the mess of https://github.com/Phrohdoh/easage/pull/16, I wiped my tags/releases and it became messy. This is a pull request from a fresh branch.
As discussed on IRC, here are instructions on using ENV VARs for storage of the deployment keys rather than needing to hard-code them into the CI configs.
This replaces the corresponding sections on the original how-to.
Sign up for an open-source account and link it to your github profile if you haven't yet.
Enable Appveyor on easage
repo from new projects page.
On your project's environment settings
Add a new variable GH_DEPLOY_API_KEY
value should be the PAT token you/github generated for you
Refer to the PAT section in the original post for info how to get this token.
Click Save
Sign up for an open-source account and link it to your github profile if you haven't yet.
Enable travis on easage
repo from your profile.
This is done via sliding the slider onto the :white_check_mark: position.
Press the :gear: icon to go into repository settings page
Add a new env var named GH_DEPLOY_API_KEY
with value: [token]
[token]
is the same token you've used for appveyor, unless you generated a separate one for Travis.
Make sure "Display value in build log" is OFF
and press Add
to save the env var.
Thank you for your monumental effort in setting up CI for this project. It is much appreciated!
I've merged this now so we can move forward. We can resolve any issues that come up in the future.
Closes #1
Windows tests (appveyor) on master only
How-to updated in this comment
You no longer need to checkout my branch or commit if using the environment variable way to setup deployment keys.
Checkout my branch for editing of the CI files
Deprecated when using env vars.
~
git clone --branch ci-ready https://github.com/Teteros/easage easage-ci
~ ~cd easage-ci
~Github's Personal Access Token (PAT)
public_repo
scope.curl -u 'Phrohdoh' -d '{"scopes":["public_repo"],"note":"easage releases"}' https://api.github.com/authorizations
(You will be asked for your github password by CURL)
or if you have two-factor auth enabled you need to make one it directly via settings page (instead of using CURL)
Redacted Curl Output:
You need the data value of
token
for setting up CI (i.ePAT_TOKEN
)Appveyor
Deprecated when using env vars.
~Sign up for an open-source account and link it to your github profile if you haven't yet.~
~Enable Appveyor on
easage
repo from new projects page .~~Take your PAT token you make earlier via curl/github ~ ~and use Appveyor's encrypt page to get the
secure
token.~~
sed -i 's/CHANGEME/SECURE_TOKEN/' appveyor.yml
~Travis CI
Deprecated when using env vars
~-Sign up for an open-source account and link it to your github profile if you haven't yet.~
~Install travis-ci command-line client. (ruby+gem install needed)~
~
gem install travis -v 1.8.8 --no-rdoc --no-ri
~~Test if
travis
is now in your path,~~
which travis
if not, it might be in~/.gem/ruby/2.4.0/bin/travis
~~While your shell is still on
easage-ci
dir you can run:~ ~(Sub in yourPAT_TOKEN
of course!)~~
sed -i "s|CHANGEME|$(travis encrypt -r Phrohdoh/easage PAT_TOKEN)|" .travis.yml
~Commit changes to ci-ready
Deprecated when using env vars
~If all went well,~
~
grep -r "secure:"
~~should reveal the
secure:
changed for both.travis.yml
andappveyor.yml
~~You can now commit changes to the
ci-ready
branch directly and it should appear on this pull request as as it's linked.~ ~I added [ci skip] to the commit message of command below so the initial commit isn't build:~~
git add {.travis.yml,appveyor.yml}; git commit -m "Changed CI secure tokens [ci skip]"; git push
~Badges
You can edit README.md to include badges for Travis and Appveyor build statuses.
More badges are available from shields.io if you want to get fancy. Maybe one that links to releases?
Travis has a button up top which you can click to display a markdown badge, while for appveyor the link should put you directly to badge preferences page.