Skip to content

Check for new release #951

Check for new release

Check for new release #951

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/github-action-get-latest-release@v0.8.0
with:
repository: olimpiadi-informatica/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@v7
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/olimpiadi-informatica/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 }}"