Repository navigation
Add GitHub Actions release workflow for PlatformIO Registry - #36
Merged
Merged
Conversation
- Add release.yml workflow that publishes to PlatformIO Registry - Trigger on release publish and manual workflow_dispatch (dry_run option) - Verify tag matches library.json version before publishing - Run offline tests (esp32dev) and native HTTP parser tests - Pack library and attach tarball to GitHub Release - Add export.exclude to library.json to exclude test/dev files - Add RELEASING.md documenting the release process Co-authored-by: James Brown <JamesSmartCell@users.noreply.github.com>
1. Fix dry run version check: skip tag comparison for non-tag refs 2. Add library.json vs library.properties version comparison 3. Pack tarball to /tmp to avoid including it in working directory 4. Publish the already-packed tarball instead of re-packing Co-authored-by: James Brown <JamesSmartCell@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a fully automated GitHub Actions workflow for publishing Web3E releases to the PlatformIO Registry.
Changes
1. Release Workflow (
.github/workflows/release.yml)Triggers:
release: types: [published]- Automatically runs when a GitHub Release is publishedworkflow_dispatchwithdry_runboolean input (default: true) - Allows manual testing without publishingSteps:
library.jsonandlibrary.propertiesversions match (fails if they don't)v1.45) matches version1.45in library filescd tests && pio test --environment esp32dev --without-uploading --without-testingcd tests/test_http_parser && pio test -e native/tmp/Web3E-package.tar.gz(outside working directory to avoid self-inclusion)pio pkg publish /tmp/Web3E-package.tar.gz --type library --owner alphawallet --no-interactive(usesPLATFORMIO_AUTH_TOKENsecret, publishes the already-packed tarball)ghCLI to upload the packed library as a release assetDry Run Mode:
dry_runis enabled (manual dispatch), the workflow packs the library and uploads it as a workflow artifact instead of publishing2. Library Package Configuration (
library.json)Added
export.excludeto prevent test/dev files from being published:Excluded:
tests/- Test suitetest-consumer/- Test consumer projecttools/- Development tools.github/- GitHub workflowsdocs/- Documentation folder (README.md is still included at root).pio,.platformio)Included:
src/- Library source codeexamples/- Example projectslibrary.json,library.properties,LICENSE,keywords.txt,README.md,RELEASING.mdThe packed library contains 90 files (verified locally with
pio pkg pack).3. Release Documentation (
RELEASING.md)Added comprehensive documentation for the release process:
library.jsonandlibrary.propertiesv1.45for version1.45)Testing
✅ Simulated workflow locally on the branch (non-tag ref):
/tmp/Web3E-package.tar.gz(90 files)tests/,tools/,.github/,test-consumer/, or*.tar.gzin packagePermissions
The workflow requires:
contents: write- To attach tarball to GitHub ReleasePLATFORMIO_AUTH_TOKENsecret - Already configured by Rob for publishingNext Steps
After this PR is merged, the release workflow will be ready to use. To publish version 1.45 (or future versions):
v1.45targetingmaster