@@ -31,8 +31,8 @@ Options:
3131
3232### Upload
3333
34- ```
35- $ github-release upload \
34+ ``` sh
35+ github-release upload \
3636 --owner cheton \
3737 --repo github-release-cli \
3838 --tag " v0.1.0" \
@@ -44,8 +44,8 @@ $ github-release upload \
4444### Delete
4545
4646You can use glob expressions to match files:
47- ```
48- $ github-release delete \
47+ ``` sh
48+ github-release delete \
4949 --owner cheton \
5050 --repo github-release-cli \
5151 --tag " v0.1.0" \
@@ -63,7 +63,7 @@ https://github.com/cncjs/cncjs-pendant-tinyweb/blob/master/.travis.yml
6363
6464First you will need to get an OAuth Token from GitHub using your own username and "note":
6565
66- ```
66+ ``` sh
6767curl \
6868 -u ' username' \
6969 -d ' {"scopes":["repo"], "note":"Publish to GitHub Releases"}' \
7272
7373For users with two-factor authentication enabled, you must send the user's authentication code (i.e., one-time password) in the ` X-GitHub-OTP ` header:
7474
75- ```
75+ ``` sh
7676curl \
7777 -u ' username' \
7878 -H ' X-GitHub-OTP: 000000' \
@@ -86,15 +86,15 @@ For reducing security risks, you can store your OAuth token in an environment va
8686
8787Export the token using the one you got from above:
8888
89- ```
89+ ``` sh
9090export GITHUB_TOKEN=your_token
9191```
9292
9393### 3. Set up a CI build
9494
9595Now you're ready to upload assets to a GitHub repository from a CI server. For example:
9696
97- ```
97+ ``` sh
9898COMMIT_LOG=` git log -1 --format=' %ci %H %s' `
9999github-release upload \
100100 --owner=cheton \
@@ -108,7 +108,7 @@ github-release upload \
108108
109109If you're using Travis CI, you may want to encrypt environment variables:
110110
111- ```
111+ ``` sh
112112travis encrypt GITHUB_TOKEN=your_token
113113```
114114
0 commit comments