-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgithub-javascript-actions-ci.yml
More file actions
57 lines (50 loc) · 1.85 KB
/
github-javascript-actions-ci.yml
File metadata and controls
57 lines (50 loc) · 1.85 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
49
50
51
52
53
54
55
56
57
name: Github JavaScript Actions CI/CD
env:
PRERELEASE_BRANCHES: 'experimental,alpha,beta,rc' # Comma separated list of prerelease branch names. 'alpha,rc,...'
on:
push:
branches:
- '**'
pull_request:
types: [closed]
jobs:
build:
name: Continuous Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node v16
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: yarn
- run: yarn ci
- name: Establish context
id: context
uses: dolittle/establish-context-action@v2 # Replace with ./ if used withing dolittle/establish-context-action
with:
prerelease-branches: ${{ env.PRERELEASE_BRANCHES }}
- name: Increment version
id: increment-version
if: ${{ steps.context.outputs.should-publish == 'true' }}
uses: dolittle/increment-version-action@v2 # Replace with ./ if used withing dolittle/increment-version-action
with:
version: ${{ steps.context.outputs.current-version }}
release-type: ${{ steps.context.outputs.release-type }}
- name: Prepend to Changelog
if: ${{ steps.context.outputs.should-publish == 'true' }}
uses: dolittle/add-to-changelog-action@v2
with:
version: ${{ steps.increment-version.outputs.next-version }}
body: ${{ steps.context.outputs.pr-body }}
pr-url: ${{ steps.context.outputs.pr-url }}
changelog-path: CHANGELOG.md
user-email: build@dolittle.com
user-name: dolittle-build
- name: Create GitHub Release
if: ${{ steps.context.outputs.should-publish == 'true' }}
uses: ./ # Replace with ./ if used withing dolittle/github-release-action
with:
token: ${{ secrets.BUILD_PAT }}
version: ${{ steps.increment-version.outputs.next-version }}
body: ${{ steps.context.outputs.pr-body }}