-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.79 KB
/
check-for-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: 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 }}"