mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
build: allow milestones to be rereleased #453
This commit is contained in:
parent
30d6c83fa3
commit
64c2f177f1
4 changed files with 6 additions and 13 deletions
11
.github/actions/check_milestone/action.yaml
vendored
11
.github/actions/check_milestone/action.yaml
vendored
|
@ -14,14 +14,6 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Get tag uniqueness
|
|
||||||
id: unique_tag
|
|
||||||
uses: mukunku/tag-exists-action@v1.2.0 # wildcard version @v1 not possible
|
|
||||||
env:
|
|
||||||
MILESTONE: ${{ inputs.milestone }}
|
|
||||||
with:
|
|
||||||
tag: ${{ env.MILESTONE }}
|
|
||||||
|
|
||||||
- name: Get closed issues for milestone
|
- name: Get closed issues for milestone
|
||||||
id: closed_issues
|
id: closed_issues
|
||||||
uses: octokit/graphql-action@v2.x
|
uses: octokit/graphql-action@v2.x
|
||||||
|
@ -93,7 +85,7 @@ runs:
|
||||||
id: outcome
|
id: outcome
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ fromJSON(steps.closed_issues.outputs.data).search.issueCount > 0 && fromJSON(steps.open_issues.outputs.data).search.issueCount == 0 && steps.unique_tag.outputs.exists == 'false' && ( (steps.patchvers.outputs.value!='0'&&steps.hasoldnotes.outputs.value=='1') || (steps.patchvers.outputs.value=='0'&&steps.hasoldnotes.outputs.value!='1') ) }}" = "true" ]; then
|
if [ "${{ fromJSON(steps.closed_issues.outputs.data).search.issueCount > 0 && fromJSON(steps.open_issues.outputs.data).search.issueCount == 0 && ( (steps.patchvers.outputs.value!='0'&&steps.hasoldnotes.outputs.value=='1') || (steps.patchvers.outputs.value=='0'&&steps.hasoldnotes.outputs.value!='1') ) }}" = "true" ]; then
|
||||||
echo "outcome=success" >> $GITHUB_OUTPUT
|
echo "outcome=success" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "outcome=failure" >> $GITHUB_OUTPUT
|
echo "outcome=failure" >> $GITHUB_OUTPUT
|
||||||
|
@ -103,7 +95,6 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo outcome : ${{ steps.outcome.outputs.outcome }}
|
echo outcome : ${{ steps.outcome.outputs.outcome }}
|
||||||
echo has unique tag : ${{ steps.unique_tag.outputs.exists == 'false' }}
|
|
||||||
echo has closed issues : ${{ fromJSON(steps.closed_issues.outputs.data).search.issueCount > 0 }}
|
echo has closed issues : ${{ fromJSON(steps.closed_issues.outputs.data).search.issueCount > 0 }}
|
||||||
echo has open issues : ${{ fromJSON(steps.open_issues.outputs.data).search.issueCount > 0 }}
|
echo has open issues : ${{ fromJSON(steps.open_issues.outputs.data).search.issueCount > 0 }}
|
||||||
echo is patch version : ${{ steps.patchvers.outputs.value != '0' }}
|
echo is patch version : ${{ steps.patchvers.outputs.value != '0' }}
|
||||||
|
|
|
@ -59,6 +59,7 @@ runs:
|
||||||
|
|
||||||
- name: Close milestone
|
- name: Close milestone
|
||||||
uses: Akkjon/close-milestone@v2
|
uses: Akkjon/close-milestone@v2
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
MILESTONE: ${{ inputs.milestone }}
|
MILESTONE: ${{ inputs.milestone }}
|
||||||
GITHUB_TOKEN: ${{ inputs.github_token }}
|
GITHUB_TOKEN: ${{ inputs.github_token }}
|
||||||
|
@ -149,6 +150,7 @@ runs:
|
||||||
|
|
||||||
- name: Create next patch milestone
|
- name: Create next patch milestone
|
||||||
uses: WyriHaximus/github-action-create-milestone@v1
|
uses: WyriHaximus/github-action-create-milestone@v1
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
MILESTONE: ${{ inputs.milestone }}
|
MILESTONE: ${{ inputs.milestone }}
|
||||||
GITHUB_TOKEN: ${{ inputs.github_token }}
|
GITHUB_TOKEN: ${{ inputs.github_token }}
|
||||||
|
|
|
@ -25,7 +25,7 @@ Once working on an issue, assign it to a fitting maintainer.
|
||||||
|
|
||||||
When done, close the ticket. Once an issue is closed, it needs to be assigned to next release milestone.
|
When done, close the ticket. Once an issue is closed, it needs to be assigned to next release milestone.
|
||||||
|
|
||||||
A once released ticket is not allowed to be reopened and rereleased in a different release. Write a new ticket in this case.
|
A once released ticket is not allowed to be reopened and rereleased in a different milestone. This would cause the changelog to be changed even for the milestone the issue was previously released in. Instead write a new ticket.
|
||||||
|
|
||||||
## Managing Pull Requests
|
## Managing Pull Requests
|
||||||
|
|
||||||
|
@ -97,6 +97,8 @@ A release is based on a milestone named like the release itself - just the versi
|
||||||
|
|
||||||
Making releases is automated by the `version-release` GitHub Action. It requires the version number of the milestone that should be released. The release will be created from the `main` branch of the repository.
|
Making releases is automated by the `version-release` GitHub Action. It requires the version number of the milestone that should be released. The release will be created from the `main` branch of the repository.
|
||||||
|
|
||||||
|
Treat released milestones as immutable. Don't rerelease an already released milestone. An already released milestone may already been consumed by your users.
|
||||||
|
|
||||||
During execution of the action a few things are checked. If a check fails the action fails, resulting in no new release. You can correct the errors afterwards and rerun the action.
|
During execution of the action a few things are checked. If a check fails the action fails, resulting in no new release. You can correct the errors afterwards and rerun the action.
|
||||||
|
|
||||||
The following checks will be enforced
|
The following checks will be enforced
|
||||||
|
@ -104,7 +106,6 @@ The following checks will be enforced
|
||||||
- the milestone exists
|
- the milestone exists
|
||||||
- there is at least one closed issue assigned to the milestone
|
- there is at least one closed issue assigned to the milestone
|
||||||
- all assigned issues for this milestone are closed
|
- all assigned issues for this milestone are closed
|
||||||
- the milestone is not previously released
|
|
||||||
- if it's a main release, there must be a new `<major>.<minor>` at the beginning of the [What's new]({{% relref "basics/migration" %}}) page
|
- if it's a main release, there must be a new `<major>.<minor>` at the beginning of the [What's new]({{% relref "basics/migration" %}}) page
|
||||||
- if it's a patch release, there must be the `<major>.<minor>` from the previous release at the beginning of the [What's new]({{% relref "basics/migration" %}}) page
|
- if it's a patch release, there must be the `<major>.<minor>` from the previous release at the beginning of the [What's new]({{% relref "basics/migration" %}}) page
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ Many thanks to [Andy Miller](https://github.com/rhukster) for initially creating
|
||||||
- https://github.com/ashley-taylor/regex-property-action
|
- https://github.com/ashley-taylor/regex-property-action
|
||||||
- https://github.com/Kaven-Universe/github-action-current-date-time
|
- https://github.com/Kaven-Universe/github-action-current-date-time
|
||||||
- https://github.com/mingjun97/file-regex-replace
|
- https://github.com/mingjun97/file-regex-replace
|
||||||
- https://github.com/mukunku/tag-exists-action
|
|
||||||
- https://github.com/octokit/graphql-action
|
- https://github.com/octokit/graphql-action
|
||||||
- https://github.com/peaceiris/actions-gh-pages
|
- https://github.com/peaceiris/actions-gh-pages
|
||||||
- https://github.com/peaceiris/actions-hugo
|
- https://github.com/peaceiris/actions-hugo
|
||||||
|
|
Loading…
Reference in a new issue