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
65 lines (56 loc) · 2.06 KB
/
release-publish.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
56
57
58
59
60
61
62
63
64
65
name: Release / Production / Publishing
on:
workflow_dispatch:
push:
branches:
- master
concurrency:
group: 'dmc-release:publish'
cancel-in-progress: false
jobs:
version:
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: master
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
- 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: Set git user to uipblot
run: |
git config --global user.name "uipblot"
git config --global user.email "[email protected]"
- name: Update versions | Production
uses: changesets/action@v1
id: changesets
with:
setupGitUser: false
version: yarn release:bump
publish: yarn release:publish
env:
GITHUB_TOKEN: ${{ secrets.UIP_GITHUB_API_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.UIP_GITHUB_API_TOKEN }}
- name: Dump published packages
if: ${{ steps.changesets.outputs.published }}
shell: /bin/bash -l {0}
run: |
echo '{"publishedPackages": ${{ steps.changesets.outputs.publishedPackages }}}' | jq > 'changesets-publish-summary.json'
- name: Post an announcement to Slack
if: ${{ steps.changesets.outputs.published }}
shell: /bin/bash -l {0}
run: |
npx @bolteu/uiprc-scripts@latest announce --reportPath 'changesets-publish-summary.json' --token '${{ env.UIP_SLACK_API_TOKEN }}'
env:
NODE_AUTH_TOKEN: ${{ secrets.UIP_GITHUB_API_TOKEN }}
UIP_SLACK_API_TOKEN: ${{ secrets.UIP_SLACK_API_TOKEN }}