-
Notifications
You must be signed in to change notification settings - Fork 20
50 lines (48 loc) · 1.53 KB
/
newversion.yml
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
45
46
47
48
49
50
name: new version
on:
push:
tags:
- '*.*.*'
jobs:
build:
name: treehouses/cli
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 10
registry-url: https://registry.npmjs.org/
- name: build
run: |
./templates/blocker/blocker.sh
ls -al ./templates/blocker/
sudo npm install -g auto-changelog
auto-changelog --version
auto-changelog --template .github/workflows/changelog-template.hbs
sync
sed -i -e "s#<#<#g" CHANGELOG.md
sed -i -e "s#>#>#g" CHANGELOG.md
ls -al
- name: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
${{ github.event.head_commit.message }}
draft: false
prerelease: false
- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: report
run: |
sudo npm install -g @treehouses/cli
export discord_channel="${{ secrets.CHANNEL }}"
treehouses feedback "new [treehouses/cli](https://github.com/treehouses/cli) release **[$( echo ${{ github.ref }} | cut -d'/' -f3 )](https://www.npmjs.com/package/@treehouses/cli/v/$( echo ${{ github.ref }} | cut -d'/' -f3 ))**"