From f8189537415920cbe4e251cbbbaff054dd26f624 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:07:51 -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 0000000..bf769ba --- /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 0000000..c855024 --- /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 0000000..0a78ec8 --- /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 75beb7136ae086ddcf9580e50e9a33dd4c5f8b33 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:07:51 -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 18078dd..0dd106f 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 4d35f6143e408ca1c893060e397cb36981fec791 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:07: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 b2a0110..4eabbb3 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 f4c0250abef4d904a6332622d24ddbff3cab1b7c Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Fri, 18 Oct 2024 13:07:52 -0700 Subject: [PATCH 4/4] Add badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5e71879..eb95c51 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # metapipeline-DNA +[![GitHub release](https://img.shields.io/github/v/release/uclahs-cds/metapipeline-DNA)](https://github.com/uclahs-cds/metapipeline-DNA/actions/workflows/prepare-release.yaml) + - [metapipeline-DNA](#metapipeline-dna) - [Overview](#overview) - [How To Run](#how-to-run)