Skip to content

⬆ Bump actions/labeler from 6.1.0 to 6.2.0 in the github-actions group #22

⬆ Bump actions/labeler from 6.1.0 to 6.2.0 in the github-actions group

⬆ Bump actions/labeler from 6.1.0 to 6.2.0 in the github-actions group #22

name: Create Draft Release
on:
pull_request:
types:
- closed
permissions: {}
jobs:
create-draft-release:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: true
- name: Extract release details
id: release-details
run: |
set -euo pipefail
version="$(node scripts/prepare-release.mjs current-version)"
echo "version=$version" >> "$GITHUB_OUTPUT"
node scripts/prepare-release.mjs release-notes > draft-release-notes.md
- name: Create draft release
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.release-details.outputs.version }}
run: |
set -euo pipefail
gh release create "$VERSION" \
--draft \
--title "$VERSION" \
--notes-file draft-release-notes.md \
--target "$(git rev-parse HEAD)"