-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (72 loc) · 2.03 KB
/
ci.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
80
81
82
name: CI
on:
pull_request:
push:
branches:
- '**'
tags:
- '!**'
workflow_dispatch:
inputs:
dryRun:
type: boolean
description: 'Run semantic-release in dry-run mode'
required: true
default: true
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: yarn
- name: Install dependencies
run: yarn install
- name: Run tests, lint and verify package integrity
run: yarn run validate
release:
permissions:
id-token: write # required for provenance
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
contents: write # to create release tags (cycjimmy/semantic-release-action)
issues: write # to post release that resolves an issue (cycjimmy/semantic-release-action)
needs: ci
runs-on: ubuntu-latest
if:
${{ github.repository ==
'testing-library/react-render-stream-testing-library' && github.event_name
== 'workflow_dispatch' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: yarn
- name: Install dependencies
run: yarn install
- name: 🏗 Run build script
run: yarn build
- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 0
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
dry_run: ${{ inputs.dryRun }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}