-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (51 loc) · 1.62 KB
/
Copy pathrelease.yml
File metadata and controls
58 lines (51 loc) · 1.62 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
58
name: Release
on:
workflow_dispatch:
inputs:
BRANCH:
description: 'Branch to release'
required: true
default: 'beta'
type: choice
options:
- 'beta'
- 'main'
jobs:
check:
name: Check release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.NGX_GITHUB_TOKEN }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: '@wlocalhost'
always-auth: true
cache: 'pnpm'
- name: Set git user
run: |
git config --global user.email "noreply@ngb.email"
git config --global user.name "NGB Email Release Bot"
- name: Install all dependencies
run: pnpm install
- name: Release
if: github.event.inputs.BRANCH == 'main'
shell: bash
run: pnpm nx run ngx-email-builder:version --push --trackDeps --skipCommit --baseBranch=main --allowEmptyRelease
env:
GITHUB_TOKEN: ${{ secrets.NGX_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Pre Release
if: github.event.inputs.BRANCH == 'beta'
shell: bash
run: pnpm nx run ngx-email-builder:version --push --trackDeps --skipCommit --baseBranch=beta --releaseAs=prerelease --preid=beta --allowEmptyRelease
env:
GITHUB_TOKEN: ${{ secrets.NGX_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}