Skip to content

Conversation

@tomas-martins-crossmint
Copy link
Contributor

This pull request updates the release workflow to use a PR-based approach, ensuring compliance with branch protection rules without requiring bypass permissions

Two-Step Release Process

The release workflow has been split into two automated workflows:

Step 1: Create Version Bump PR (release.yml)

Manually triggered workflow that validates the version format, runs tests and linting, updates SDKVersion.swift, and creates a PR to main with the release label. The PR includes a changelog preview generated from GitHub's release notes API, showing all merged PRs since the last tag

Step 2: Auto Release (auto-release.yml)

Triggers automatically when a PR with the "release" label is merged to main. Extracts the version from the PR title, verifies it matches SDKVersion.swift, creates and pushes the git tag, and generates the GitHub release with auto-generated notes

Usage

Trigger the workflow from the terminal:

gh workflow run release.yml -f version=0.0.9

Once the PR is created and merged, the release is automatically generated

- Modified release.yml to create a version bump PR instead of direct commit
- Created auto-release.yml to automatically create release when PR is merged
- Workflow now respects branch protection rules
The validation 'failures' on push are harmless - they're just GitHub validating the YAML syntax. Since the workflow only has workflow_dispatch trigger, it won't actually run on push.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants