From 816be936da24932df9bceaf2f72610c32ca5c411 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:36:52 -0700 Subject: [PATCH 1/4] Add release management workflows --- .github/workflows/alias-release.yaml | 19 +++++++++++++++ .github/workflows/finalize-release.yaml | 24 +++++++++++++++++++ .github/workflows/prepare-release.yaml | 32 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 .github/workflows/alias-release.yaml create mode 100644 .github/workflows/finalize-release.yaml create mode 100644 .github/workflows/prepare-release.yaml diff --git a/.github/workflows/alias-release.yaml b/.github/workflows/alias-release.yaml new file mode 100644 index 00000000..bf769bae --- /dev/null +++ b/.github/workflows/alias-release.yaml @@ -0,0 +1,19 @@ +--- +name: 🛠️ Update release alias tags + +run-name: Update alias for ${{ github.event.action }} ${{ github.event.release.name }} + +on: + release: + types: + - published + - deleted + +permissions: + actions: read + contents: write + +jobs: + update-alias: + uses: uclahs-cds/tool-create-release/.github/workflows/wf-alias-release.yaml@v1 + secrets: inherit diff --git a/.github/workflows/finalize-release.yaml b/.github/workflows/finalize-release.yaml new file mode 100644 index 00000000..c8550241 --- /dev/null +++ b/.github/workflows/finalize-release.yaml @@ -0,0 +1,24 @@ +--- +name: 🛠️ Finalize release + +run-name: Finalize release from branch `${{ github.event.pull_request.head.ref }}` + +on: + pull_request: + branches: + - main + types: + - closed + +permissions: + actions: read + contents: write + pull-requests: write + +jobs: + finalize-release: + if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'automation-create-release') }} + uses: uclahs-cds/tool-create-release/.github/workflows/wf-finalize-release.yaml@v1 + secrets: inherit + with: + draft: false diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml new file mode 100644 index 00000000..0a78ec88 --- /dev/null +++ b/.github/workflows/prepare-release.yaml @@ -0,0 +1,32 @@ +--- +name: 📦 Prepare new release + +run-name: Open PR for new ${{ inputs.bump_type }} release + +on: + workflow_dispatch: + inputs: + bump_type: + type: choice + description: Semantic version bump type + required: true + options: + - major + - minor + - patch + prerelease: + type: boolean + description: Create a prerelease + +permissions: + actions: read + contents: write + pull-requests: write + +jobs: + prepare-release: + uses: uclahs-cds/tool-create-release/.github/workflows/wf-prepare-release.yaml@v1 + with: + bump_type: ${{ inputs.bump_type }} + prerelease: ${{ inputs.prerelease }} + secrets: inherit From 237eaeca24a3d8a5bfe8f58bcb4a88363cb52dbd Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:36:52 -0700 Subject: [PATCH 2/4] Enable Dependabot for GitHub Actions --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 18078ddd..0dd106f3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,3 +12,7 @@ updates: patterns: - "*/pipeline-Nextflow-config" - "*/pipeline-Nextflow-module" + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly From 3e66c959ba59fd5a3c26116c2e50e07ca6374e21 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:36:52 -0700 Subject: [PATCH 3/4] Fix triggers for release asset workflow --- .github/workflows/pipeline-release.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pipeline-release.yaml b/.github/workflows/pipeline-release.yaml index 70c7f200..64569bdc 100644 --- a/.github/workflows/pipeline-release.yaml +++ b/.github/workflows/pipeline-release.yaml @@ -1,7 +1,5 @@ --- on: - push: - tags: "v*" release: types: [published] From f737517732464a37e9d03d15a33926852cb9035c Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:36:52 -0700 Subject: [PATCH 4/4] Add badge to README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 17e11182..227554ea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # pipeline-call-sSNV + +[![GitHub release](https://img.shields.io/github/v/release/uclahs-cds/pipeline-call-sSNV)](https://github.com/uclahs-cds/pipeline-call-sSNV/actions/workflows/prepare-release.yaml) + - [call-sSNV](#pipeline-call-ssnv) - [Overview](#overview) - [How To Run](#how-to-run)