-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (34 loc) · 1.37 KB
/
prerelease.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
name: 'Forms Pre-release'
on:
workflow_dispatch:
inputs:
branch:
description: Specify the git branch you want to prerelease
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-node@v2
with:
cache: yarn
node-version: "14"
registry-url: https://registry.npmjs.org
- run: yarn install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- name: Setup git user to "🤖 Release Bot"
run: git config user.email "-" && git config user.name "🤖 Release Bot"
- name: Version
id: version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use npx instead of yarn because yarn auto-magically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
# run: npx nx affected --base=master --releaseAs=minor --target=version
run: npx --no-install nx run workspace:pre-version --baseBranch=${{ github.event.inputs.branch }} --syncVersions --releaseAs=prerelease --preid=${{ github.event.inputs.branch }}