|
1 |
| -name: "Draft new release" |
| 1 | +name: "Release 1 - Initial New Release" |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_dispatch:
|
5 | 5 | inputs:
|
6 | 6 | version:
|
7 | 7 | description: "The version you want to release."
|
8 | 8 | required: true
|
| 9 | + default: "1.0.0" |
9 | 10 |
|
10 | 11 | jobs:
|
11 | 12 | draft-new-release:
|
12 | 13 | name: "Draft a new release"
|
13 | 14 | runs-on: ubuntu-latest
|
14 | 15 | steps:
|
15 |
| - - uses: actions/checkout@v2 |
| 16 | + - uses: actions/checkout@v4 |
16 | 17 |
|
17 | 18 | - name: Create release branch
|
18 | 19 | run: git checkout -b release/${{ github.event.inputs.version }}
|
19 | 20 |
|
20 |
| - # In order to make a commit, we need to initialize a user. |
21 |
| - # You may choose to write something less generic here if you want, it doesn't matter functionality wise. |
22 | 21 | - name: Initialize mandatory git config
|
23 | 22 | run: |
|
24 | 23 | git config user.name "GitHub actions"
|
25 | 24 | git config user.email noreply@github.com
|
26 | 25 |
|
27 |
| - # This step will differ depending on your project setup |
28 |
| - # Fortunately, yarn has a built-in command for doing this! |
29 | 26 | - name: Bump version in package.json
|
30 | 27 | run: yarn version --new-version ${{ github.event.inputs.version }} --no-git-tag-version
|
31 | 28 |
|
32 | 29 | - name: Commit manifest files
|
33 | 30 | id: make-commit
|
34 | 31 | run: |
|
35 | 32 | git add .
|
36 |
| - git commit --message "Prepare release ${{ github.event.inputs.version }}" |
37 |
| -
|
38 |
| - echo "::set-output name=commit::$(git rev-parse HEAD)" |
| 33 | + git commit --message "Bump version to ${{ github.event.inputs.version }}" |
39 | 34 |
|
40 | 35 | - name: Push new branch
|
41 | 36 | run: git push origin release/${{ github.event.inputs.version }}
|
42 | 37 |
|
43 | 38 | - name: Create pull request
|
44 |
| - uses: thomaseizinger/create-pull-request@1.0.0 |
| 39 | + uses: thomaseizinger/create-pull-request@1.4.0 |
45 | 40 | env:
|
46 | 41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
47 | 42 | with:
|
48 | 43 | head: release/${{ github.event.inputs.version }}
|
49 |
| - base: master |
| 44 | + base: develop |
50 | 45 | title: Release version ${{ github.event.inputs.version }}
|
51 |
| - reviewers: ${{ github.actor }} # By default, we request a review from the person who triggered the workflow. |
52 |
| - # Write a nice message to the user. |
53 |
| - # We are claiming things here based on the `publish-new-release.yml` workflow. |
54 |
| - # You should obviously adopt it to say the truth depending on your release workflow :) |
| 46 | + reviewers: ${{ github.actor }} #Assign the PR to the user who triggered the release |
| 47 | + # team-reviewers: | |
| 48 | + # developers |
| 49 | + # qa-team |
55 | 50 | body: |
|
56 | 51 | Hi @${{ github.actor }}!
|
57 | 52 |
|
58 | 53 | This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.
|
59 |
| - I've updated the changelog and bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit }}. |
| 54 | + I've bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit }}. |
60 | 55 |
|
61 | 56 | Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.
|
| 57 | +
|
| 58 | + Happy merging! |
0 commit comments