-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.41 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Pre-release
on:
pull_request:
types: [closed]
branches:
- main
permissions:
contents: write # for checkout and tag
pull-requests: write # for comments
packages: write # for publish
jobs:
publish:
if: github.event.pull_request.merged == true
name: Pre-release
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Setup do nodejs"
uses: actions/setup-node@v2
with:
node-version: 20
cache: "yarn"
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup npm env
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install
run: yarn install
- name: Build libs
run: yarn build:libs
- name: Bump versions and publish packages
run: |
yarn publish:canary
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}