Skip to content

Commit e0ed88d

Browse files
authored
docs: Add documentation info for Github Actions (#338)
1 parent 4b4f9c2 commit e0ed88d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,33 @@ jobs:
9696
2. Login to CircleCI to configure the package
9797
* Enable builds of your repo
9898
* Add `GH_TOKEN` and `NPM_TOKEN` environment variables in the settings
99+
100+
101+
## Github Actions
102+
103+
For Github Actions, `semantic-release-cli` performs the following additional step:
104+
* Login to Github to configure the package
105+
* Add `NPM_TOKEN` environment variables as a secret in the settings
106+
107+
For now you will have to manually modify your existing workflow to add a release step. Here is an example of a small complete workflow `.github/workflows/workflow.yml`:
108+
```yaml
109+
name: CI
110+
on: push
111+
jobs:
112+
test:
113+
runs-on: ubuntu-16.04
114+
steps:
115+
- uses: actions/checkout@v2
116+
- uses: actions/setup-node@v1
117+
with:
118+
node-version: '12'
119+
- run: npm ci
120+
- run: npm test
121+
- name: Release
122+
env:
123+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
124+
run: npx semantic-release
125+
```
99126

100127
## Other CI Servers
101128

0 commit comments

Comments
 (0)