Check for new release #594
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: Check for new release | |
on: | |
schedule: | |
- cron: '20 4 * * *' | |
workflow_dispatch: | |
repository_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Get latest tmr release | |
id: getrelease | |
uses: pozetroninc/[email protected] | |
with: | |
repository: edomora97/task-maker-rust | |
excludes: prerelease, draft | |
- name: Check if the version is new | |
id: checkver | |
run: | | |
UPSTREAM_VERSION=${{ steps.getrelease.outputs.release }} | |
chmod +x ./check-for-release.sh | |
UPSTREAM_VERSION=${UPSTREAM_VERSION:1} ./check-for-release.sh | |
- name: Create PR | |
id: cpr | |
if: steps.checkver.outputs.createpr == 'yes' | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: Update task-maker-rust to ${{ steps.getrelease.outputs.release }} | |
branch: update-${{ steps.getrelease.outputs.release }} | |
delete-branch: true | |
title: Update task-maker-rust to ${{ steps.getrelease.outputs.release }} | |
body: | | |
Update task-maker-rust to ${{ steps.getrelease.outputs.release }}. | |
See https://github.com/edomora97/task-maker-rust/releases/tag/${{ steps.getrelease.outputs.release }} | |
Merge this PR to build & publish the new version | |
labels: new-release | |
- name: Show PR info | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Operation - ${{ steps.cpr.outputs.pull-request-operation }}" | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |