diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml deleted file mode 100644 index 0b5690f..0000000 --- a/.github/workflows/fast-forward.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: fast-forward -on: - issue_comment: - types: [ created, edited ] -jobs: - fast-forward: - # Only run if the comment contains the /fast-forward command. - if: | - contains(github.event.comment.body, '/fast-forward') && - github.event.issue.pull_request && - github.base_ref == 'develop' - runs-on: ubuntu-latest - - permissions: - contents: write - pull-requests: write - issues: write - - steps: - - name: Fast forwarding - uses: sequoia-pgp/fast-forward@v1 - with: - merge: true - # To reduce the workflow's verbosity, use 'on-error' - # to only post a comment when an error occurs, or 'never' to - # never post a comment. (In all cases the information is - # still available in the step's summary.) - comment: on-error diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index 29d3662..0000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: pull-request -on: - pull_request: - branches: - - develop - types: [ opened, reopened, synchronize ] -jobs: - check-fast-forward: - runs-on: ubuntu-latest - - permissions: - contents: read - # We appear to need write permission for both pull-requests and - # issues in order to post a comment to a pull request. - pull-requests: write - issues: write - - steps: - - name: Checking if fast forwarding is possible - uses: sequoia-pgp/fast-forward@v1 - with: - merge: false - # To reduce the workflow's verbosity, use 'on-error' - # to only post a comment when an error occurs, or 'never' to - # never post a comment. (In all cases the information is - # still available in the step's summary.) - comment: on-error diff --git a/.github/workflows/release-ff-and-tag.yml b/.github/workflows/release-ff-and-tag.yml new file mode 100644 index 0000000..04effb1 --- /dev/null +++ b/.github/workflows/release-ff-and-tag.yml @@ -0,0 +1,33 @@ +name: Release - Fast-Forward and Tag +on: + workflow_dispatch: + inputs: + tag_name: + description: 'Provide a tag name (e.g. v1.0.0)' + required: true + type: string + +jobs: + ff-and-tag: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: 'master' + - name: Merge Fast Forward + uses: MaximeHeckel/github-action-merge-fast-forward@v1.1.0 + with: + branchtomerge: origin/develop + branch: master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create and Push Tag + run: | + git tag ${{ inputs.tag_name }} + git push origin ${{ inputs.tag_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}