Fix update versions action #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | |
team-reviewers: "team-website" |