Skip to content

🔖 Create Release

Overview

This GitHub Action automates the creation of a GitHub release after the Build and Publish workflow is completed. It can also be manually triggered.

How It Works

The workflow is triggered via manual dispatch (workflow_dispatch). It was previously set to run automatically after the Build and Publish workflow but is now only triggered manually.

Workflow Configuration

Trigger

  • workflow_dispatch: The workflow must be started manually via the GitHub Actions tab.

Environment Variables

  • _WORKFLOW_STATE: Tracks whether the Update Changelog workflow (4.update-changelog.yml) is active.

Jobs

1. Create Release

This job generates a new GitHub release.

  • Runs on: ubuntu-22.04
  • Permissions:
    • contents: write
    • actions: write
  • Steps:
  • Checkout the repository
  • Create a GitHub release using gh release create with auto-generated release notes.
  • Check if the Changelog workflow (4.update-changelog.yml) is active.
  • Trigger the Changelog update workflow if active.

Usage

To trigger this workflow:

  1. Navigate to the repository on GitHub.
  2. Go to the Actions tab.
  3. Select "3. Create Release" from the workflow list.
  4. Click "Run workflow" to start the release process.

Required Secrets

  • GITHUB_TOKEN: Required for creating the release and triggering workflows.

Scripts Used

  • get-version.sh: Retrieves the current version number for tagging the release.

Notes

  • The release is tagged as v<version> using gh release create.
  • Release notes are automatically generated.
  • If the Update Changelog workflow is active, it will be triggered.

Troubleshooting

  • If the workflow fails at the Create Release step, verify that GITHUB_TOKEN has sufficient permissions.
  • If the Changelog update is not triggered, ensure 4.update-changelog.yml is configured correctly and its state is active.
  • If the version is incorrect, check if get-version.sh is executable and returning the expected value.