-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.46 KB
/
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
51
52
name: Release
on:
issue_comment:
types: [ created ]
workflow_dispatch:
jobs:
main:
if: (!github.event.issue.number || github.event.issue.number == 1)
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: main
fetch-depth: 0
token: ${{ secrets.X_GITHUB_TOKEN }}
- name: Checkout phpstan/phpstan-src
uses: actions/checkout@v4
with:
repository: phpstan/phpstan-src
path: phpstan
fetch-depth: 0
- name: Setup PHP 8.4
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- name: Find uncreated phpstan tag
id: uncreated-phpstan-tag
run: |
cd main
php -f scripts/find.php
- name: Create a new tag
if: steps.uncreated-phpstan-tag.outputs.tag != 'none'
run: |
cd main
php -f scripts/create.php ${{ steps.uncreated-phpstan-tag.outputs.tag }}
- name: Release a new version
if: steps.uncreated-phpstan-tag.outputs.tag != 'none'
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.uncreated-phpstan-tag.outputs.tag }}
name: ${{ steps.uncreated-phpstan-tag.outputs.tag }}
body: https://github.com/phpstan/phpstan-src/tree/${{ steps.uncreated-phpstan-tag.outputs.tag }}
token: ${{ secrets.X_GITHUB_TOKEN }}