-
Notifications
You must be signed in to change notification settings - Fork 617
50 lines (40 loc) · 1.37 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
name: Custom Release
on:
workflow_dispatch:
repository_dispatch:
types: [release]
env:
NODE_OPTIONS: --max_old_space_size=4096
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jobs:
npm-release:
name: NPM release ("${{ github.event.client_payload.tag }}" tag)
runs-on: webiny-build-packages
environment: release
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}
fetch-depth: 0
- name: Install dependencies
run: yarn --immutable
- name: Build packages
run: yarn build
- name: Create ".npmrc" file in the project root
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Set git email
run: git config --global user.email "[email protected]"
- name: Set git username
run: git config --global user.name "webiny-bot"
- name: Version and Publish
run: >
yarn release
--type=${{ github.event.client_payload.type }}
--tag=${{ github.event.client_payload.tag }}
--version=${{ github.event.client_payload.version }}
--createGithubRelease=${{ github.event.client_payload.createGithubRelease }}