-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (53 loc) · 1.59 KB
/
release.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
name: Release
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
type: choice
options:
- 'latest'
- 'beta'
default: 'beta'
version:
description: 'Version'
required: true
default: ''
jobs:
master:
runs-on: ubuntu-22.04
name: Build and publish
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install
yarn set-version ${{ github.event.inputs.version }}
yarn publish:${{ github.event.inputs.release_type }}
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Github-Bot
author_email: [email protected]
message: 'Release version ${{ github.event.inputs.version }}'
- name: Notify to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
username: Chain List Notifier
title: ${{ github.workflow }}
description: |
The deployment has been completed.
Release ${{ github.event.inputs.release_type }} version ${{ github.event.inputs.version }}