generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.3 KB
/
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
name: publish
on:
workflow_dispatch:
inputs:
version:
description: 'version'
required: true
type: string
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
git checkout -b release/${{ github.event.inputs.version }}
git push --set-upstream origin release/${{ github.event.inputs.version }}
- uses: actions/setup-node@v3
with:
node-version: 16.x
- run: yarn install --immutable
- name: 'set environments'
run: |
git config --global user.name "sendbird-sdk-deployment"
git config --global user.email "sha.sdk_deployment@sendbird.com"
- name: 'publish to github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn release-it ${{ github.event.inputs.version }} --ci
- name: Tag new target
run: git tag -f latest ${{ github.event.inputs.version }}
- name: Push new tag
run: git push origin latest --force
- name: 'create a pull request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create --title "chore(release): publish ${{ github.event.inputs.version }}" --body "created by automation"