generated from actions/typescript-action
65 lines (55 loc) · 1.62 KB
/
publish.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: create-release
on:
push:
tags:
- "v*"
jobs:
create-release:
name: create-release
runs-on: macos-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v2
- name: 🏗 Setup Node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: npm
- name: cache
uses: actions/cache@v3
id: cachepackages
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: 📦 Install dependencies
if: steps.cachepackages.outputs.cache-hit != 'true'
run: npm install --force
- name: 🚀 Build actions
run: npm run all
- name: 🚀 Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
- name: 💬 Comment in Slack
uses: slackapi/slack-github-action@v1.17.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
with:
channel-id: C03DY3QTBTQ
slack-message: '【发布】archiver-action: ${{ github.ref }}'