From a335225c6037fa0693e0731830ecef4754a053c3 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Wed, 2 Oct 2024 14:56:04 -0700 Subject: [PATCH 1/3] Add release management workflows --- .github/workflows/alias-release.yaml | 20 +++++++++++++++ .github/workflows/finalize-release.yaml | 25 +++++++++++++++++++ .github/workflows/prepare-release.yaml | 33 +++++++++++++++++++++++++ 3 files changed, 78 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..9e2332cc --- /dev/null +++ b/.github/workflows/alias-release.yaml @@ -0,0 +1,20 @@ +--- +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 are only required until tool-create-release is made public + secrets: inherit diff --git a/.github/workflows/finalize-release.yaml b/.github/workflows/finalize-release.yaml new file mode 100644 index 00000000..131a4466 --- /dev/null +++ b/.github/workflows/finalize-release.yaml @@ -0,0 +1,25 @@ +--- +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 + with: + draft: true + # Secrets are only required until tool-create-release is made public + secrets: inherit diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml new file mode 100644 index 00000000..d55e19ee --- /dev/null +++ b/.github/workflows/prepare-release.yaml @@ -0,0 +1,33 @@ +--- +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 are only required until tool-create-release is made public + secrets: inherit From e993e2d629797723949f6c2c336c008cae592c20 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Wed, 2 Oct 2024 14:57:05 -0700 Subject: [PATCH 2/3] Add 'version_files' argument --- .github/workflows/prepare-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index d55e19ee..524d01a4 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -29,5 +29,6 @@ jobs: with: bump_type: ${{ inputs.bump_type }} prerelease: ${{ inputs.prerelease }} + version_files: nextflow.config # Secrets are only required until tool-create-release is made public secrets: inherit From 0904c9ae13020b8590cb224dca9bb056ae047694 Mon Sep 17 00:00:00 2001 From: Nicholas Wiltsie Date: Wed, 2 Oct 2024 14:57:48 -0700 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e8eee65..12dca8ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Added + +- Add release management workflows from `tool-create-release` + ### [Changed] - Use `run_validate_PipeVal_with_metadata` to gate on validation - Move index/dictionary file discovery to configuration stage