Skip to content

Commit 36d7a97

Browse files
authored
Update README.md
1 parent 066345b commit 36d7a97

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

4646
You 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

6464
First you will need to get an OAuth Token from GitHub using your own username and "note":
6565

66-
```
66+
```sh
6767
curl \
6868
-u 'username' \
6969
-d '{"scopes":["repo"], "note":"Publish to GitHub Releases"}' \
@@ -72,7 +72,7 @@ curl \
7272

7373
For 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
7676
curl \
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

8787
Export the token using the one you got from above:
8888

89-
```
89+
```sh
9090
export GITHUB_TOKEN=your_token
9191
```
9292

9393
### 3. Set up a CI build
9494

9595
Now you're ready to upload assets to a GitHub repository from a CI server. For example:
9696

97-
```
97+
```sh
9898
COMMIT_LOG=`git log -1 --format='%ci %H %s'`
9999
github-release upload \
100100
--owner=cheton \
@@ -108,7 +108,7 @@ github-release upload \
108108

109109
If you're using Travis CI, you may want to encrypt environment variables:
110110

111-
```
111+
```sh
112112
travis encrypt GITHUB_TOKEN=your_token
113113
```
114114

0 commit comments

Comments
 (0)