Add workflow to create version labels on new releases (#32508)

Summary:
This PR adds the following GitHub actions:

- https://github.com/lucasbento/core-workflow-create-version-label - Create version labels (such as `Version: 0.65.1`) whenever there's a new release;
- https://github.com/lucasbento/core-workflow-apply-version-label - Apply a version label to opened/edited issues based on the version mentioned on the issue body.

## Changelog

N/A.

## Few things to keep in mind

- A label named "Version: unspecified" must be created;
- The GitHub action to create labels will only run when there's a new release or if one is edited, it will then create all the other labels bases on the previous releases until it encounters one that already exists.

 ---

Example of issue with version label: https://github.com/lucasbento/test-issue-forms/issues/4

Pull Request resolved: https://github.com/facebook/react-native/pull/32508

Reviewed By: cortinico

Differential Revision: D32055682

Pulled By: lunaleaps

fbshipit-source-id: 04d3e942eb1f71b3bc1d5a643b0156c35ef5f00b
This commit is contained in:
Lucas Bento
2021-11-01 11:41:19 -07:00
committed by Facebook GitHub Bot
parent 18f62544c6
commit 60352a9549
5 changed files with 41 additions and 7 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ body:
id: react-native-info
attributes:
label: Output of `react-native info`
description: Run `react-native info` in your terminal and copy the results here.
description: Run `react-native info` in your terminal, copy and paste the results here.
validations:
required: true
- type: textarea
@@ -23,10 +23,10 @@ body:
validations:
required: true
- type: textarea
id: environment
id: react-native-info
attributes:
label: Developer Environment
description: Please list relevant versions of system, tooling. Ex. OS, processor, Xcode, etc.
label: Output of `react-native info`
description: Run `react-native info` in your terminal, copy and paste the results here.
validations:
required: true
- type: textarea
@@ -31,10 +31,10 @@ body:
validations:
required: true
- type: textarea
id: environment
id: react-native-info
attributes:
label: Developer Environment
description: Please list relevant versions of system, tooling. Ex. OS, processor, Xcode, etc.
label: Output of `react-native info`
description: Run `react-native info` in your terminal, copy and paste the results here.
validations:
required: true
- type: textarea
@@ -0,0 +1,16 @@
name: Apply version label to issue
on:
issues:
types: [opened, edited]
jobs:
add-version-label-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: lucasbento/core-workflow-apply-version-label@v0.0.4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,18 @@
name: Create new tag as version label
on:
release:
types:
- created
- edited
jobs:
add-new-tag-version-label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: lucasbento/core-workflow-create-version-label@v0.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}