From 97a807ca64e3f4bfdb269f7cb3f873dea386ea63 Mon Sep 17 00:00:00 2001 From: huizebruin <62996429+huizebruin@users.noreply.github.com> Date: Sat, 29 Jun 2024 19:51:08 +0200 Subject: [PATCH] Small github update * Small GitHub update --- .github/release-drafter.yml | 3 ++- .github/workflows/release-drafter.yaml | 15 ++++++++++--- .github/workflows/release.yml | 31 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index ffc9be7..c684610 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,7 +1,8 @@ --- name-template: "v$RESOLVED_VERSION" tag-template: "$RESOLVED_VERSION" -change-template: "- #$NUMBER $TITLE @$AUTHOR" +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' sort-direction: ascending categories: diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml index b7fcfe7..0ef621e 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/release-drafter.yaml @@ -5,14 +5,23 @@ on: push: branches: - main + pull_request: + types: + - opened + - reopened + - synchronize + +permissions: + contents: read jobs: update_release_draft: - name: ✏️ Draft release - runs-on: ubuntu-latest permissions: contents: write - pull-requests: read + pull-requests: write + checks: write + name: ✏️ Draft release + runs-on: ubuntu-latest steps: - name: 🚀 Run Release Drafter uses: release-drafter/release-drafter@v6.0.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cd9f8c0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +jobs: + release: + permissions: + contents: write + pull-requests: write + id-token: write + runs-on: ubuntu-latest + steps: + - name: Get variables + id: version + run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" + + - uses: actions/checkout@v4 + with: + ref: ${{ steps.version.outputs.version }} + + - uses: release-drafter/release-drafter@v6.0.0 + with: + tag: ${{ steps.version.outputs.version }} + name: v${{ steps.version.outputs.version }} + version: ${{ steps.version.outputs.version }} + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN } \ No newline at end of file