-
Notifications
You must be signed in to change notification settings - Fork 10
79 lines (67 loc) · 2.11 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: release
on:
pull_request:
paths-ignore:
- 'docs/**'
- '.clang-format'
- '.gitignore'
- 'README.md'
workflow_dispatch:
inputs:
release_type:
type: choice
description: Release type
options:
- major
- minor
- patch
default: patch
jobs:
release:
runs-on: [ ubuntu-22.04 ]
environment: prod
steps:
- name: Check out branch
uses: actions/checkout@v3
- name: Create release branch
run: git checkout -b release/latest}
- name: Set git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '[email protected]'
- name: Setup Node.js environment
uses: actions/[email protected]
with:
registry-url: 'https://registry.npmjs.org'
- name: Update version in package.json
run: |
npm version ${{ inputs.release_type }} -m "${{ inputs.release_type }} release %s"
git status
- name: Push new branch
run: git push origin release/latest
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.event.pull_request.head.ref }}
tags: true
- name: Create pull request into main
uses: thomaseizinger/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: release/latest
base: master
title: Update version in package.json
reviewers: ${{ github.event.issue.user.login }}
body: |
Hi!
This PR was created in response workflow running.
I've updated the version in package.json.
# - name: Publish package on GPR
# run: |
# npm config set registry https://npm.pkg.github.com
# npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
# npm publish
# - name: Publish package on NPM
# run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}