Skip to content

Merge pull request #178 from deepworks-net/develop/bridge-tests #264

Merge pull request #178 from deepworks-net/develop/bridge-tests

Merge pull request #178 from deepworks-net/develop/bridge-tests #264

name: Release Drafter
on:
push:
branches:
- staging
workflow_call:
inputs:
draft:
description: 'Create as draft release'
required: false
type: boolean
default: false
secrets:
token:
description: 'GitHub token for release creation'
required: false
permissions:
contents: write
pull-requests: read # Added to allow reading PR data for release notes
issues: read # Added as release-drafter often needs this for linking issues
jobs:
update_release_draft:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/staging'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }} # Ensures the current repository
ref: staging # Explicitly specify the develop branch
fetch-depth: 0
- name: Calculate Next Version
uses: ./actions/core/version_calculator
id: version
- name: Draft Release
uses: release-drafter/release-drafter@v6
with:
publish: false
version: ${{ steps.version.outputs.next_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: release-drafter/release-drafter@v6
with:
publish: true
tag: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}