mirror of
https://github.com/actions/python-versions.git
synced 2025-04-05 23:09:40 +00:00
Move release and PR creation to the GitHub Actions
This commit is contained in:
33
.github/workflows/create-pr.yml
vendored
Normal file
33
.github/workflows/create-pr.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Create Pull Request
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
jobs:
|
||||
create_pr:
|
||||
name: Create Pull Request
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Create versions-manifest.json
|
||||
run: |
|
||||
./helpers/packages-generation/manifest-generator.ps1 -RepositoryFullName "$env:GITHUB_REPOSITORY" `
|
||||
-GitHubAccessToken "${{secrets.GITHUB_TOKEN}}" `
|
||||
-OutputFile "./versions-manifest.json" `
|
||||
-ConfigurationFile "./config/python-manifest-config.json"
|
||||
- name: Create GitHub PR
|
||||
run: |
|
||||
$formattedDate = Get-Date -Format "MM/dd/yyyy"
|
||||
./helpers/github/create-pull-request.ps1 `
|
||||
-RepositoryFullName "$env:GITHUB_REPOSITORY" `
|
||||
-AccessToken "${{secrets.GITHUB_TOKEN}}" `
|
||||
-BranchName "update-versions-manifest-file" `
|
||||
-CommitMessage "Update versions-manifest" `
|
||||
-PullRequestTitle "[versions-manifest] Update for release from ${formattedDate}" `
|
||||
-PullRequestBody "Update versions-manifest.json for release from ${formattedDate}"
|
18
.github/workflows/create-release.yml
vendored
Normal file
18
.github/workflows/create-release.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
name: Create release
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [create-release]
|
||||
|
||||
jobs:
|
||||
create_release:
|
||||
name: Create release ${{ github.event.client_payload.ToolVersion }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create release for Python ${{ github.event.client_payload.ToolVersion }}
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.event.client_payload.TagName }}
|
||||
release_name: ${{ github.event.client_payload.ToolVersion }}
|
||||
body: ${{ github.event.client_payload.ReleaseBody }}
|
Reference in New Issue
Block a user