forked from browser-actions/release-chrome-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.69 KB
/
release-minor.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
name: Release Minor
on: workflow_dispatch
jobs:
release-minor:
name: Release Minor
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- name: Set minor version
id: minor_version
run: |
MINOR_VERSION=$(npm version --no-git-tag-version --no-commit-hooks minor)
yarn install
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_OUTPUT
- name: Commit, push and create tag
uses: EndBug/add-and-commit@v9
with:
fetch: true
default_author: github_actions
message: Release ${{ steps.minor_version.outputs.MINOR_VERSION }}
pathspec_error_handling: exitImmediately
push: true
tag: ${{ steps.minor_version.outputs.MINOR_VERSION }}
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ steps.minor_version.outputs.MINOR_VERSION }} --generate-notes
- name: Set next dev version
id: dev_version
run: |
DEV_VERSION=$(npm version --no-git-tag-version --no-commit-hooks prerelease)
yarn install
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_OUTPUT
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
fetch: true
default_author: github_actions
message: Set next dev version to ${{ steps.dev_version.outputs.DEV_VERSION }}
pathspec_error_handling: exitImmediately
push: true