forked from mi6/ic-ui-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 1.31 KB
/
ic-ui-kit-release.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
name: Release
permissions: read-all
on: workflow_dispatch
# Runs release-check
# Then creates an env variable with the version changes to display as the body of the develop -> main PR
jobs:
ic-ui-kit-release:
name: "Release develop -> main"
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: "0"
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
with:
node-version: 20
- uses: browser-actions/setup-chrome@97349de5c98094d4fc9412f31c524d7697115ad8 #v1.5.0
- name: Run release check
run: |
RELEASE_CHECK=$((echo y; sleep 0.5; echo $'\n';) | npm run release-check)
echo "VERSION=$(echo $RELEASE_CHECK | cut -c 223-293)" >> $GITHUB_ENV
git stash
- name: Create develop -> main PR
run: |
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/repos/mi6/ic-ui-kit/pulls" -d '{"title":"Develop -> Main","body":"Update to npm version ${{ env.VERSION }}","head":"develop","base":"main"}'