From 2b481d43c6e2f2af403fa0124cd00b7e321adfcb Mon Sep 17 00:00:00 2001 From: Verena Chung <9377970+vpchung@users.noreply.github.com> Date: Tue, 5 Mar 2024 13:50:09 -0800 Subject: [PATCH] add workflow for drafting release (#80) * add workflow for drafting release * add template for release draft * remove unneeded job from workflow --- .github/release-template.yml | 24 ++++++++++++++++++++++++ .github/workflows/create-release.yml | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/release-template.yml create mode 100644 .github/workflows/create-release.yml diff --git a/.github/release-template.yml b/.github/release-template.yml new file mode 100644 index 0000000..4c294a7 --- /dev/null +++ b/.github/release-template.yml @@ -0,0 +1,24 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +change-template: '- $TITLE (#$NUMBER)' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + patch: + labels: + - 'patch' + default: patch +exclude-labels: + - 'non-release' +template: | + ## What's Changed + + $CHANGES + + ## Contributors + + $CONTRIBUTORS diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..5a1ef0f --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,23 @@ +name: Draft a new data model release + +on: + workflow_run: + workflows: [ Check if PR has requird labels ] + types: [ completed ] + +jobs: + create-update-draft: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + permissions: + contents: write + pull-requests: read + steps: + - name: Create or update a release draft + uses: release-drafter/release-drafter@v6.0.0 + with: + config-name: release-template.yml + disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file