forked from il-mix/pulsar-chocolatey
-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.25 KB
/
draft_publish.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
name: Chocolatey Draft Publish Pulsar
on:
issues:
types: [ labeled ]
jobs:
draft_publish:
if: contains(github.event.issue.labels.*.name, 'release')
runs-on: windows-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Latest Code
uses: actions/checkout@v3
- name: Install Python Requirements
run: pip install requests
- name: Init New Version
run: python init.py ${{ github.event.issue.title }}
- name: Create Pull Request With Changes
uses: peter-evans/create-pull-request@v4
with:
# We use a custom PAT token here, since `GITHUB_TOKEN` is unable to create
# new workflow runs from PRs, such as tests.
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
token: ${{ secrets.PAT_TOKEN_FOR_PRS }}
commit-message: Draft ${{ github.event.issue.title }} Release
branch: release-${{ github.event.issue.title }}
delete-branch: true
title: '[${{ github.event.issue.title }}] Draft Release'
body: |
Automated Draft of new Pulsar Chocolatey Release
Will close #${{ github.event.issue.number }}
draft: false