-
Notifications
You must be signed in to change notification settings - Fork 181
48 lines (40 loc) · 1.34 KB
/
release-final.yml
File metadata and controls
48 lines (40 loc) · 1.34 KB
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
name: Release Final
on:
workflow_dispatch:
inputs:
increment:
description: 'Defines which part of a SemVer should be increased during the release process, e.g "major", "minor" or "patch"'
default: "minor"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# changelog is generated from git log
fetch-depth: 0
# release must bypass branch protection rules, built-in GITHUB_TOKEN doesn't work
token: ${{ secrets.RELEASE_GH_TOKEN }}
- name: Check if branch is not master
if: github.ref != 'refs/heads/master'
run: exit 1
- uses: ./.github/actions/setup
- run: npm run lint
- run: npm run build
- run: npm run test
- run: npm run e2e
- name: Configure GIT
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install release-it
run: npm install -g release-it@14.6.1
- name: Final Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_USERCONFIG: .npmrc-publish
run: |
release-it ${{ github.event.inputs.increment }} --ci