diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 00000000..87aaea02 --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,5 @@ +enhancement: feature/* +bug: bugfix/* +dependency: renovate/* +documentation: docs/* +release: release/* diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 00000000..e970330e --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,16 @@ +name: PullRequestLabeler +on: + pull_request: + types: [opened] + +permissions: read-all + +jobs: + pr-labeler: + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@bd0b592a410983316a454e3d48444608f028ec8e # tag=v3 + with: + configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value + env: + GITHUB_TOKEN: ${{ secrets.PUBLISH_KEY }} diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml new file mode 100644 index 00000000..885cd84e --- /dev/null +++ b/.github/workflows/release-draft.yml @@ -0,0 +1,21 @@ +name: CreateRelease +on: + push: + tags: + - v* + +jobs: + build: + name: Draft release action + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e # tag=v6.0.0 + with: + script: | + github.rest.repos.createRelease({ + owner: "${{ github.repository_owner }}", + repo: "abort-mission", + tag_name: "${{ github.ref_name }}", + generate_release_notes: true, + draft: true + }); diff --git a/.github/workflows/release-trigger.yml b/.github/workflows/release-trigger.yml new file mode 100644 index 00000000..7b1ae0ab --- /dev/null +++ b/.github/workflows/release-trigger.yml @@ -0,0 +1,59 @@ +name: ReleaseTrigger +on: + workflow_dispatch: + inputs: + execution: + description: 'Type of execution' + required: true + default: 'Manual' + type: choice + options: + - Manual + schedule: + # * is a special character in YAML, so we have to quote this string + - cron: '0 4 5 * *' + +jobs: + build: + name: Release trigger action + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # tag=v2.4.0 + with: + fetch-depth: 0 + token: ${{ secrets.PUBLISH_KEY }} + - name: "Check existing tag" + id: check + run: | + echo "::set-output name=has_tag::$(git log --format='format:%d' --decorate-refs="refs/tags/v*" -n 1 | grep tag | wc -l)" + - name: Debug + run: | + echo "Has tag: ${{ steps.check.outputs.has_tag }}" + echo "---" + echo "Execution: ${{ github.event.inputs.execution }}" + echo "---" + echo "Should run: ${{ steps.check.outputs.has_tag == 0 || github.event.inputs.execution == 'Manual' }}" + - name: "Update trigger" + if: ${{ steps.check.outputs.has_tag == 0 || github.event.inputs.execution == 'Manual' }} + run: | + date +%s > .release-trigger + - name: "git branch" + if: ${{ steps.check.outputs.has_tag == 0 || github.event.inputs.execution == 'Manual' }} + run: | + git config --global user.name 'Esta Nagy' + git config --global user.email 'nagyesta@gmail.com' + git checkout -b release/run-${{ github.run_number }} + git add .release-trigger + git commit -asm "Triggering a release {patch}" + git push -f --set-upstream origin release/run-${{ github.run_number }} + - uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e # tag=v6.0.0 + if: ${{ steps.check.outputs.has_tag == 0 || github.event.inputs.execution == 'Manual' }} + with: + script: | + github.rest.pulls.create({ + owner: "${{ github.repository_owner }}", + repo: "abort-mission", + head: "release/run-${{ github.run_number }}", + base: "main", + title: "Triggering a release {patch}" + }); diff --git a/pull_request_template.md b/pull_request_template.md index 195931a8..44fdff71 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,26 +1,24 @@ -__Issue:__ <#issue number> - -### Nature of change - -- *e.g., New feature, bugfix, etc.* +__Issue:__ N/A ### Description + -- *A short summary of changes* +- ### Entry point + -- *Where should the reviewer start in order to properly understand the PR?* +- ### Checklists -- [ ] I have rebased my branch -- [ ] My commit message is meaningful +- [x] I have rebased my branch +- [x] My commit message is meaningful - [ ] The commit messages use semantic versioning: ```{major}```, ```{minor}``` or ```{patch}``` - [ ] The changes are focusing on the issue at hand -- [ ] Tests are passing - [ ] I have maintained or increased test coverage ### Notes -- *Any additional remarks you may have.* +- +