Automated Weekly Update #3
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: Automated Weekly Update | |
on: | |
schedule: | |
- cron: '0 0 * * 1' # Automatic runs every Monday at 00:00 UTC | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT }} | |
ssh-strict: true | |
persist-credentials: false | |
clean: true | |
lfs: false | |
submodules: false | |
set-safe-directory: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
registry-url: "https://registry.npmjs.org/" | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Update Contracts | |
env: | |
RONIN_EXPLORER_API_URL: ${{ secrets.RONIN_EXPLORER_API_URL }} | |
run: pnpm run update-contracts | |
- name: Format | |
run: pnpm format | |
- name: Check for changes | |
id: git-check | |
run: | | |
git diff --quiet && git diff --staged --quiet || echo "::set-output name=changes_detected::true" | |
- name: Increment package version | |
if: steps.git-check.outputs.changes_detected == 'true' | |
run: | | |
pnpm version patch --no-git-tag-version | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add package.json | |
git commit -m "Increment package version" | |
- name: Create Pull Request | |
if: steps.git-check.outputs.changes_detected == 'true' | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
commit-message: "Weekly update" | |
title: "Weekly update" | |
body: "Update the contents" | |
branch: "updates/${{ github.run_number }}" | |
delete-branch: true | |
labels: "automated pr" | |
assignees: "alexx855" |