This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
forked from reportportal/agent-js-jest
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.66 KB
/
release-candidate.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
name: Release / RC
on:
workflow_dispatch:
concurrency:
group: 'dmc-release:rc'
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
name: Release agent-js-jest
steps:
- name: Set branch name
id: branch
run: echo "::set-output name=branch-name::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})"
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ steps.branch.outputs.branch-name }}
token: ${{ secrets.UIP_GITHUB_API_TOKEN }}
fetch-depth: 0 # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
- name: Set current sha
id: short-sha
run: echo "::set-output name=short-sha::$(git rev-parse --short HEAD)"
- uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
node-version-file: '.nvmrc'
- name: Install dependencies
shell: /bin/bash -l {0}
run: yarn install --prefer-offline --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.UIP_GITHUB_API_TOKEN }}
- name: Update versions | RC
shell: /bin/bash -l {0}
run: |
echo 'Preparing RC release...'
yarn changeset version --snapshot 'rc.${{ steps.short-sha.outputs.short-sha }}'
yarn install --no-frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.UIP_GITHUB_API_TOKEN }}
- name: Publish packages
shell: /bin/bash -l {0}
run: yarn changeset publish --tag 'rc' --no-git-tag
env:
NODE_AUTH_TOKEN: ${{ secrets.UIP_GITHUB_API_TOKEN }}