-
Notifications
You must be signed in to change notification settings - Fork 121
44 lines (40 loc) · 1.32 KB
/
Copy pathcreate_release.yml
File metadata and controls
44 lines (40 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Create Release
on:
push:
branches:
- master
jobs:
# We create a new version if the branch is master.
version_and_publish:
name: Create Release
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
outputs:
release_version: ${{ steps.generate_version.outputs.release_version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
# In future we should run tests to ensure if it's worth making a release.
- name: Install semantic-release
run: |
npm set registry https://registry.npmjs.org/
sudo npm install -g \
semantic-release \
@semantic-release/commit-analyzer \
@semantic-release/github \
@semantic-release/exec \
@semantic-release/release-notes-generator \
conventional-changelog-conventionalcommits
- name: Generate version
id: generate_version
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
npx semantic-release --ci
- name: No Releases Done
if: "!steps.generate_version.outputs.release_version"
run: |
echo "No Release was done either due to wrong commit or no major changes."