-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (60 loc) · 1.74 KB
/
release.yaml
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
66
67
68
69
70
71
name: Build & Create Release PR
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
description: 'Release version'
required: true
permissions:
contents: write
pull-requests: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
- name: Update version
run: |
npm version ${{ github.event.inputs.version }} --allow-same-version --no-git-tag-version
- name: Commit package.json
uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081
with:
author_name: Link-
author_email: [email protected]
message: 'Update version'
add: 'package.json'
push: false
- name: Build package
run: |
npm run build
- name: Commit new build
uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081
with:
author_name: Link-
author_email: [email protected]
message: 'Update build'
add: 'bin/starred_search'
push: false
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Release ${{ github.event.inputs.version }}'
title: 'Release ${{ github.event.inputs.version }}'
base: master
branch: ${{ github.event.inputs.version }}
delete-branch: true
labels: |
release
ignore-for-release
reviewers: 'Link-'
assignees: 'Link-'
draft: false