Skip to content

Conversation

@vicdotdevelop
Copy link
Owner

Add GitHub Actions workflow for pub.dev publishing

Changes

  • Implemented a GitHub Actions workflow to automate package publishing to pub.dev
  • The workflow is triggered when new version tags are pushed (format: v*.*.*)
  • Added version verification to ensure the tag matches the pubspec.yaml version
  • Secured credential handling using GitHub Secrets
  • Included caching of Flutter dependencies to improve workflow speed

Implementation Details

The workflow:

  1. Sets up a Flutter environment with the stable channel
  2. Validates that the git tag version matches the version in pubspec.yaml
  3. Securely handles pub.dev credentials using GitHub Secrets
  4. Forces publication to ensure smooth deployment
  5. Cleans up sensitive credential files after publishing

Usage

To publish a new version:

  1. Update the version in pubspec.yaml
  2. Create and push a tag matching that version (e.g., v1.2.3)
  3. The workflow will automatically publish to pub.dev

References

@vicdotdevelop vicdotdevelop mentioned this pull request Mar 31, 2025
@vicdotdevelop vicdotdevelop merged commit 5e56652 into master Mar 31, 2025
1 check passed
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.

1 participant