Skip to content

Commit 8a8addd

Browse files
committed
feat: add Terraform Registry publishing configuration
- Add comprehensive PUBLISHING.md guide with step-by-step instructions - Create GitHub Actions release workflow for automated releases - Add tfplugindocs configuration for registry documentation - Create RELEASE_CHECKLIST.md for consistent release process - Add placeholder Terraform Registry badge to README - Configure GoReleaser for proper signing and registry manifest
1 parent 8ab8977 commit 8a8addd

6 files changed

Lines changed: 519 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: 'go.mod'
24+
cache: true
25+
26+
- name: Import GPG key
27+
id: import_gpg
28+
uses: crazy-max/ghaction-import-gpg@v6
29+
with:
30+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
31+
passphrase: ${{ secrets.PASSPHRASE }}
32+
33+
- name: Run GoReleaser
34+
uses: goreleaser/goreleaser-action@v5
35+
with:
36+
version: latest
37+
args: release --clean
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.tfplugindocs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Configuration for tfplugindocs documentation generation
2+
# https://github.com/hashicorp/terraform-plugin-docs
3+
4+
# The provider name as used in Terraform configurations
5+
provider-name: pocketid
6+
7+
# Render website docs suitable for deployment to registry.terraform.io
8+
# Enables special formatting for the Terraform Registry
9+
website:
10+
# Enable website rendering mode
11+
enabled: true
12+
13+
# Provider display name for the registry
14+
provider-name: Pocket-ID
15+
16+
# Skip generating the provider index page (we have a custom one)
17+
skip-index: false
18+
19+
# Ignore deprecated resources or data sources from documentation
20+
ignore-deprecated: true
21+
22+
# Generate documentation for all resources and data sources
23+
# even if they don't have examples
24+
generate-all: true
25+
26+
# Custom templates directory (optional)
27+
# templates-dir: docs/templates
28+
29+
# Example configuration
30+
examples:
31+
# Path to examples directory
32+
dir: examples
33+
34+
# Include resource examples
35+
resources: true
36+
37+
# Include data source examples
38+
data-sources: true
39+
40+
# Include provider examples
41+
provider: true
42+
43+
# Sections to include in generated docs
44+
sections:
45+
resources: true
46+
data-sources: true
47+
guides: true
48+
49+
# Schema rendering options
50+
schema:
51+
# Render required attributes in bold
52+
required-bold: true
53+
54+
# Show attribute descriptions
55+
show-descriptions: true
56+
57+
# Show nested attributes
58+
show-nested: true
59+
60+
# Legacy sidebar generation for older Terraform Registry versions
61+
legacy-sidebar: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Terraform Provider for Pocket-ID
22

3+
[![Terraform Registry](https://img.shields.io/badge/Terraform%20Registry-pending-yellow)](https://registry.terraform.io/providers/trozz/pocketid/latest)
34
[![CI](https://github.com/Trozz/terraform-provider-pocketid/actions/workflows/ci.yml/badge.svg)](https://github.com/Trozz/terraform-provider-pocketid/actions/workflows/ci.yml)
45
[![Go Report Card](https://goreportcard.com/badge/github.com/Trozz/terraform-provider-pocketid)](https://goreportcard.com/report/github.com/Trozz/terraform-provider-pocketid)
56
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

RELEASE_CHECKLIST.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Release Checklist for Terraform Provider for Pocket-ID
2+
3+
This checklist ensures a smooth release process for new versions of the provider.
4+
5+
## Pre-Release Checklist
6+
7+
### Code Quality
8+
- [ ] All unit tests pass locally (`make test`)
9+
- [ ] All acceptance tests pass locally (`make test-acc`)
10+
- [ ] No linting errors (`make lint`)
11+
- [ ] Code coverage is acceptable (aim for >80%)
12+
- [ ] All PR feedback has been addressed
13+
14+
### Documentation
15+
- [ ] CHANGELOG.md is updated with all changes
16+
- [ ] README.md is up to date
17+
- [ ] Resource documentation is complete
18+
- [ ] Data source documentation is complete
19+
- [ ] Examples are working and up to date
20+
- [ ] Run `tfplugindocs generate` to update generated docs
21+
- [ ] Review generated documentation for accuracy
22+
23+
### Version Preparation
24+
- [ ] Decide on version number following semantic versioning
25+
- [ ] MAJOR version for incompatible API changes
26+
- [ ] MINOR version for backwards-compatible functionality
27+
- [ ] PATCH version for backwards-compatible bug fixes
28+
- [ ] Update version references if hardcoded anywhere
29+
- [ ] Review and update compatibility matrix if needed
30+
31+
### Testing
32+
- [ ] Test upgrade path from previous version
33+
- [ ] Test with minimum supported Terraform version
34+
- [ ] Test with latest Terraform version
35+
- [ ] Test all resource CRUD operations
36+
- [ ] Test all data sources
37+
- [ ] Test import functionality
38+
- [ ] Verify sensitive values are properly masked
39+
40+
## Release Process
41+
42+
### 1. Final Checks
43+
- [ ] Ensure main branch is up to date
44+
- [ ] No uncommitted changes (`git status`)
45+
- [ ] All CI checks are passing on main branch
46+
47+
### 2. Create Release Tag
48+
```bash
49+
# For a new release (e.g., v0.1.0)
50+
git tag -a v0.1.0 -m "Release v0.1.0"
51+
52+
# For a pre-release (e.g., v0.1.0-rc.1)
53+
git tag -a v0.1.0-rc.1 -m "Pre-release v0.1.0-rc.1"
54+
55+
# Push the tag
56+
git push origin v0.1.0
57+
```
58+
59+
### 3. Monitor Release Workflow
60+
- [ ] Check GitHub Actions release workflow is running
61+
- [ ] Verify GPG signing is successful
62+
- [ ] Confirm all platform binaries are built
63+
- [ ] Check that release assets are properly uploaded
64+
65+
### 4. Verify GitHub Release
66+
- [ ] Release appears on GitHub releases page
67+
- [ ] Release notes are properly formatted
68+
- [ ] All required assets are present:
69+
- [ ] Binary archives for all platforms
70+
- [ ] SHA256SUMS file
71+
- [ ] SHA256SUMS.sig file
72+
- [ ] Manifest JSON file
73+
- [ ] Download and verify one binary works
74+
75+
### 5. Terraform Registry (First Time Only)
76+
- [ ] Sign in to Terraform Registry
77+
- [ ] Publish provider following PUBLISHING.md
78+
- [ ] Verify webhook is created
79+
- [ ] Confirm provider page is live
80+
81+
### 6. Verify Registry Release
82+
- [ ] New version appears on Terraform Registry
83+
- [ ] Documentation is properly rendered
84+
- [ ] Installation instructions are correct
85+
- [ ] Test installation with new version:
86+
```hcl
87+
terraform {
88+
required_providers {
89+
pocketid = {
90+
source = "trozz/pocketid"
91+
version = "0.1.0" # Use actual version
92+
}
93+
}
94+
}
95+
```
96+
97+
## Post-Release Checklist
98+
99+
### Communication
100+
- [ ] Create GitHub discussion/announcement
101+
- [ ] Update any pinned issues
102+
- [ ] Notify Pocket-ID community (if applicable)
103+
- [ ] Update project board/milestones
104+
105+
### Documentation Updates
106+
- [ ] Update README.md badge from "pending" to active
107+
- [ ] Update installation examples to use Registry source
108+
- [ ] Archive any outdated documentation
109+
- [ ] Update compatibility matrix
110+
111+
### Monitoring
112+
- [ ] Monitor GitHub issues for problems
113+
- [ ] Check Terraform Registry for any issues
114+
- [ ] Watch for user feedback
115+
- [ ] Track download statistics
116+
117+
### Housekeeping
118+
- [ ] Close milestone for this release
119+
- [ ] Create milestone for next release
120+
- [ ] Update project board
121+
- [ ] Plan next release features
122+
123+
## Rollback Plan
124+
125+
If issues are discovered after release:
126+
127+
1. **Do NOT delete or modify the release** - this breaks checksums
128+
2. **Document the issue** in:
129+
- GitHub release notes (edit to add warning)
130+
- README.md if critical
131+
- Open a GitHub issue
132+
3. **Release a patch version** with the fix
133+
4. **Communicate** the issue and fix to users
134+
135+
## Emergency Contacts
136+
137+
- Terraform Registry Support: terraform-registry@hashicorp.com
138+
- GitHub Support: https://support.github.com
139+
- GPG Key Issues: Check PUBLISHING.md troubleshooting
140+
141+
## Version History
142+
143+
Track releases here for reference:
144+
145+
| Version | Date | Type | Notes |
146+
|---------|------|------|-------|
147+
| v0.1.0 | TBD | Initial | First public release |
148+
149+
---
150+
151+
**Remember**: Once a version is released, it cannot be changed. Always release a new version for fixes.

0 commit comments

Comments
 (0)