Skip to content

Update preview

Update preview #65

name: Update preview
on:
workflow_run:
workflows: ["Release packages"]
types:
- completed
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."
# This is doesn't work due to what seems a permission issue https://github.com/peter-evans/create-pull-request/issues/155
# team-reviewers: "team-website"