You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ "$DRY_RUN" != "true" && "$VERSION_FROM_TAG" != "$VERSION_RB" ]]; then
70
+
echo "::error::Tag version ($VERSION_FROM_TAG) does not match lib/log_struct/version.rb ($VERSION_RB). Update version.rb before tagging, or run as dry-run."
71
+
exit 1
72
+
fi
73
+
36
74
- name: Generate site exports (enums/structs/keys)
37
75
run: |
38
76
ruby scripts/export_typescript_types.rb
39
77
78
+
- name: Build gem
79
+
run: |
80
+
gem build logstruct.gemspec
81
+
ls -la *.gem
82
+
83
+
- name: Publish gem to RubyGems
84
+
if: env.DRY_RUN != 'true'
85
+
env:
86
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
87
+
run: |
88
+
if [[ -z "$RUBYGEMS_API_KEY" ]]; then
89
+
echo '::error::RUBYGEMS_API_KEY secret is missing.'
- Generate TypeScript types from Ruby log structs: `scripts/export_typescript_types.rb`
46
46
47
+
## Terraform Provider repo in this workspace
48
+
49
+
- The Terraform provider lives in a separate GitHub repo: `DocSpring/terraform-provider-logstruct`.
50
+
- For convenience, the provider repo is checked out as a plain directory at `./terraform-provider-logstruct/` in this repo. It is NOT a Git submodule and is ignored by this repo’s `.gitignore`.
51
+
- You can inspect/build it locally:
52
+
-`cd terraform-provider-logstruct`
53
+
-`go build ./...`
54
+
- Changes you make here are not committed by this repo. To contribute to the provider, commit from inside its directory and push to its own remote.
- Push tag matching `v*` (e.g., `v0.0.1-rc1`, `v0.2.0`).
61
+
- GitHub Release published.
62
+
- Manual run (workflow_dispatch) with `dry_run` input.
63
+
- Behavior:
64
+
- Builds and publishes the Ruby gem to RubyGems (requires `RUBYGEMS_API_KEY`).
65
+
- Regenerates the provider’s embedded catalog (`scripts/export_provider_catalog.rb`), builds the provider, commits catalog changes, and tags the provider repo with the same version.
66
+
- Enforces version alignment: the tag `vX.Y.Z` (or RC) must match `lib/log_struct/version.rb` unless run in dry-run.
67
+
68
+
## Dry-run mode
69
+
70
+
- CI dry-run lets you smoke-test the workflow without publishing anything:
0 commit comments