-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (44 loc) · 1.42 KB
/
update-versions.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
name: Update preview
on:
workflow_run:
workflows: ["Release packages"]
types:
- completed
pull_request:
jobs:
update_preview:
runs-on: ubuntu-latest
permissions:
contents: "write"
pull-requests: "write"
steps:
- uses: actions/checkout@v2
with:
ref: "main"
fetch-depth: 0
- name: "Get latest tag"
id: latesttag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: 16.17.0
- run: npm install -g yarn
- name: Update preview app
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
./scripts/update-versions.sh ${{ steps.latesttag.outputs.tag }}
shell: bash
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: update-versions-to-${{ steps.latesttag.outputs.tag }}
title: Update @ably/ui version in repo to ${{ steps.latesttag.outputs.tag }}
body: "Update files that are not updated during the release process.
Sometimes published packages are not available immediately so we open this PR for convenience."