Update preview #47
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 | |
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.0.0 | |
bundler-cache: true | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "16.17.0" | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- run: npm install -g yarn | |
- name: Update preview app | |
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 }} |