Skip to content

Commit 6f74b39

Browse files
committed
Add release plan and release workflow - Create detailed release plan for version 2.0.0 - Add GitHub Actions workflow for automating releases - Add support for cross-platform binary releases
1 parent c250040 commit 6f74b39

File tree

2 files changed

+377
-0
lines changed

2 files changed

+377
-0
lines changed

.github/workflows/release.yml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build-and-release:
10+
name: Build and Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: "1.21"
22+
cache: true
23+
24+
- name: Install dependencies
25+
run: go mod download
26+
27+
- name: Set up asset names
28+
id: assets
29+
run: |
30+
VERSION=${GITHUB_REF#refs/tags/}
31+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
32+
echo "linux_amd64=export_trakt_${VERSION}_linux_amd64" >> $GITHUB_OUTPUT
33+
echo "linux_arm64=export_trakt_${VERSION}_linux_arm64" >> $GITHUB_OUTPUT
34+
echo "linux_arm=export_trakt_${VERSION}_linux_arm" >> $GITHUB_OUTPUT
35+
echo "darwin_amd64=export_trakt_${VERSION}_darwin_amd64" >> $GITHUB_OUTPUT
36+
echo "darwin_arm64=export_trakt_${VERSION}_darwin_arm64" >> $GITHUB_OUTPUT
37+
echo "windows_amd64=export_trakt_${VERSION}_windows_amd64.exe" >> $GITHUB_OUTPUT
38+
39+
- name: Build for Linux (amd64)
40+
run: GOOS=linux GOARCH=amd64 go build -o "${{ steps.assets.outputs.linux_amd64 }}" -v ./cmd/export_trakt
41+
42+
- name: Build for Linux (arm64)
43+
run: GOOS=linux GOARCH=arm64 go build -o "${{ steps.assets.outputs.linux_arm64 }}" -v ./cmd/export_trakt
44+
45+
- name: Build for Linux (arm)
46+
run: GOOS=linux GOARCH=arm go build -o "${{ steps.assets.outputs.linux_arm }}" -v ./cmd/export_trakt
47+
48+
- name: Build for macOS (amd64)
49+
run: GOOS=darwin GOARCH=amd64 go build -o "${{ steps.assets.outputs.darwin_amd64 }}" -v ./cmd/export_trakt
50+
51+
- name: Build for macOS (arm64)
52+
run: GOOS=darwin GOARCH=arm64 go build -o "${{ steps.assets.outputs.darwin_arm64 }}" -v ./cmd/export_trakt
53+
54+
- name: Build for Windows (amd64)
55+
run: GOOS=windows GOARCH=amd64 go build -o "${{ steps.assets.outputs.windows_amd64 }}" -v ./cmd/export_trakt
56+
57+
- name: Generate checksums
58+
run: |
59+
sha256sum ${{ steps.assets.outputs.linux_amd64 }} > ${{ steps.assets.outputs.linux_amd64 }}.sha256
60+
sha256sum ${{ steps.assets.outputs.linux_arm64 }} > ${{ steps.assets.outputs.linux_arm64 }}.sha256
61+
sha256sum ${{ steps.assets.outputs.linux_arm }} > ${{ steps.assets.outputs.linux_arm }}.sha256
62+
sha256sum ${{ steps.assets.outputs.darwin_amd64 }} > ${{ steps.assets.outputs.darwin_amd64 }}.sha256
63+
sha256sum ${{ steps.assets.outputs.darwin_arm64 }} > ${{ steps.assets.outputs.darwin_arm64 }}.sha256
64+
sha256sum ${{ steps.assets.outputs.windows_amd64 }} > ${{ steps.assets.outputs.windows_amd64 }}.sha256
65+
66+
- name: Prepare assets
67+
run: |
68+
mkdir -p releases
69+
cp ${{ steps.assets.outputs.linux_amd64 }} releases/
70+
cp ${{ steps.assets.outputs.linux_amd64 }}.sha256 releases/
71+
cp ${{ steps.assets.outputs.linux_arm64 }} releases/
72+
cp ${{ steps.assets.outputs.linux_arm64 }}.sha256 releases/
73+
cp ${{ steps.assets.outputs.linux_arm }} releases/
74+
cp ${{ steps.assets.outputs.linux_arm }}.sha256 releases/
75+
cp ${{ steps.assets.outputs.darwin_amd64 }} releases/
76+
cp ${{ steps.assets.outputs.darwin_amd64 }}.sha256 releases/
77+
cp ${{ steps.assets.outputs.darwin_arm64 }} releases/
78+
cp ${{ steps.assets.outputs.darwin_arm64 }}.sha256 releases/
79+
cp ${{ steps.assets.outputs.windows_amd64 }} releases/
80+
cp ${{ steps.assets.outputs.windows_amd64 }}.sha256 releases/
81+
cp README.md releases/
82+
cp LICENSE releases/
83+
cp -R locales releases/
84+
cp config/config.toml releases/
85+
86+
cd releases
87+
zip -r export_trakt_${{ steps.assets.outputs.version }}_linux_amd64.zip ${{ steps.assets.outputs.linux_amd64 }} ${{ steps.assets.outputs.linux_amd64 }}.sha256 README.md LICENSE locales config.toml
88+
zip -r export_trakt_${{ steps.assets.outputs.version }}_linux_arm64.zip ${{ steps.assets.outputs.linux_arm64 }} ${{ steps.assets.outputs.linux_arm64 }}.sha256 README.md LICENSE locales config.toml
89+
zip -r export_trakt_${{ steps.assets.outputs.version }}_linux_arm.zip ${{ steps.assets.outputs.linux_arm }} ${{ steps.assets.outputs.linux_arm }}.sha256 README.md LICENSE locales config.toml
90+
zip -r export_trakt_${{ steps.assets.outputs.version }}_darwin_amd64.zip ${{ steps.assets.outputs.darwin_amd64 }} ${{ steps.assets.outputs.darwin_amd64 }}.sha256 README.md LICENSE locales config.toml
91+
zip -r export_trakt_${{ steps.assets.outputs.version }}_darwin_arm64.zip ${{ steps.assets.outputs.darwin_arm64 }} ${{ steps.assets.outputs.darwin_arm64 }}.sha256 README.md LICENSE locales config.toml
92+
zip -r export_trakt_${{ steps.assets.outputs.version }}_windows_amd64.zip ${{ steps.assets.outputs.windows_amd64 }} ${{ steps.assets.outputs.windows_amd64 }}.sha256 README.md LICENSE locales config.toml
93+
94+
- name: Generate Release Notes
95+
id: release_notes
96+
run: |
97+
echo "Generating release notes for ${{ steps.assets.outputs.version }}"
98+
VERSION_TAG="${{ steps.assets.outputs.version }}"
99+
PREV_TAG=$(git describe --tags --abbrev=0 ${VERSION_TAG}^ 2>/dev/null || echo "")
100+
101+
if [ -z "$PREV_TAG" ]; then
102+
# If there's no previous tag, use all commits
103+
COMMITS=$(git log --pretty=format:"* %s (%h)" ${VERSION_TAG})
104+
else
105+
# Otherwise use commits between the previous tag and this one
106+
COMMITS=$(git log --pretty=format:"* %s (%h)" ${PREV_TAG}..${VERSION_TAG})
107+
fi
108+
109+
cat > release_notes.md << EOF
110+
# Export_Trakt_4_Letterboxd ${{ steps.assets.outputs.version }}
111+
112+
## Changes
113+
114+
${COMMITS}
115+
116+
## Installation
117+
118+
### Linux (amd64)
119+
\`\`\`bash
120+
curl -LO https://github.com/JohanDevl/Export_Trakt_4_Letterboxd/releases/download/${{ steps.assets.outputs.version }}/export_trakt_${{ steps.assets.outputs.version }}_linux_amd64.zip
121+
unzip export_trakt_${{ steps.assets.outputs.version }}_linux_amd64.zip
122+
chmod +x export_trakt_${{ steps.assets.outputs.version }}_linux_amd64
123+
./export_trakt_${{ steps.assets.outputs.version }}_linux_amd64 --config config.toml
124+
\`\`\`
125+
126+
### Docker
127+
\`\`\`bash
128+
docker pull ghcr.io/johandevl/export_trakt_4_letterboxd:${{ steps.assets.outputs.version }}
129+
docker run -v $(pwd)/config:/app/config -v $(pwd)/logs:/app/logs -v $(pwd)/exports:/app/exports ghcr.io/johandevl/export_trakt_4_letterboxd:${{ steps.assets.outputs.version }}
130+
\`\`\`
131+
132+
For more information, see the [documentation](https://github.com/JohanDevl/Export_Trakt_4_Letterboxd/blob/main/README.md).
133+
EOF
134+
135+
cat release_notes.md
136+
137+
- name: Create Release
138+
id: create_release
139+
uses: softprops/action-gh-release@v1
140+
with:
141+
tag_name: ${{ steps.assets.outputs.version }}
142+
name: Export_Trakt_4_Letterboxd ${{ steps.assets.outputs.version }}
143+
body_path: release_notes.md
144+
draft: false
145+
prerelease: ${{ contains(steps.assets.outputs.version, 'beta') || contains(steps.assets.outputs.version, 'rc') }}
146+
files: |
147+
releases/export_trakt_${{ steps.assets.outputs.version }}_linux_amd64.zip
148+
releases/export_trakt_${{ steps.assets.outputs.version }}_linux_arm64.zip
149+
releases/export_trakt_${{ steps.assets.outputs.version }}_linux_arm.zip
150+
releases/export_trakt_${{ steps.assets.outputs.version }}_darwin_amd64.zip
151+
releases/export_trakt_${{ steps.assets.outputs.version }}_darwin_arm64.zip
152+
releases/export_trakt_${{ steps.assets.outputs.version }}_windows_amd64.zip
153+
releases/${{ steps.assets.outputs.linux_amd64 }}
154+
releases/${{ steps.assets.outputs.linux_arm64 }}
155+
releases/${{ steps.assets.outputs.linux_arm }}
156+
releases/${{ steps.assets.outputs.darwin_amd64 }}
157+
releases/${{ steps.assets.outputs.darwin_arm64 }}
158+
releases/${{ steps.assets.outputs.windows_amd64 }}
159+
env:
160+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
162+
docker:
163+
name: Docker Release Image
164+
needs: build-and-release
165+
runs-on: ubuntu-latest
166+
steps:
167+
- name: Checkout code
168+
uses: actions/checkout@v3
169+
170+
- name: Set up Docker Buildx
171+
uses: docker/setup-buildx-action@v2
172+
173+
- name: Login to GitHub Container Registry
174+
uses: docker/login-action@v2
175+
with:
176+
registry: ghcr.io
177+
username: ${{ github.repository_owner }}
178+
password: ${{ secrets.GITHUB_TOKEN }}
179+
180+
- name: Extract tag version
181+
id: tag
182+
run: |
183+
VERSION=${GITHUB_REF#refs/tags/}
184+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
185+
echo "Extracted version: ${VERSION}"
186+
187+
- name: Build and push
188+
uses: docker/build-push-action@v4
189+
with:
190+
context: .
191+
file: ./Dockerfile.go
192+
push: true
193+
tags: |
194+
ghcr.io/${{ github.repository_owner }}/export_trakt_4_letterboxd:${{ steps.tag.outputs.version }}
195+
${{ !contains(steps.tag.outputs.version, 'beta') && !contains(steps.tag.outputs.version, 'rc') && format('ghcr.io/{0}/export_trakt_4_letterboxd:latest', github.repository_owner) || '' }}
196+
platforms: linux/amd64,linux/arm64,linux/arm/v7
197+
labels: |
198+
org.opencontainers.image.title=Export_Trakt_4_Letterboxd
199+
org.opencontainers.image.description=Export your Trakt.tv history to Letterboxd format
200+
org.opencontainers.image.url=https://github.com/JohanDevl/Export_Trakt_4_Letterboxd
201+
org.opencontainers.image.source=https://github.com/JohanDevl/Export_Trakt_4_Letterboxd
202+
org.opencontainers.image.version=${{ steps.tag.outputs.version }}
203+
org.opencontainers.image.created=${{ github.event.repository.pushed_at }}
204+
org.opencontainers.image.licenses=MIT

docs/RELEASE_PLAN.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Release Plan: Export_Trakt_4_Letterboxd 2.0.0
2+
3+
This document outlines the plan for releasing version 2.0.0 of Export_Trakt_4_Letterboxd, which represents the migration from Bash to Go.
4+
5+
## Release Timeline
6+
7+
| Milestone | Date | Description |
8+
| ------------------- | ------ | -------------------------------------- |
9+
| Beta 1 | Week 1 | Initial beta release for early testing |
10+
| Beta 2 | Week 3 | Updated beta with feedback from Beta 1 |
11+
| Release Candidate 1 | Week 5 | Pre-release version for final testing |
12+
| GA Release (2.0.0) | Week 6 | Official 2.0.0 release |
13+
14+
## Version Numbering
15+
16+
- **2.0.0**: Major version bump reflecting the complete rewrite from Bash to Go
17+
- Future minor releases (2.1.0, 2.2.0, etc.) will add new features
18+
- Patch releases (2.0.1, 2.0.2, etc.) will address bugs and security fixes
19+
20+
## Pre-Release Checklist
21+
22+
### Beta 1
23+
24+
- [ ] Complete core functionality
25+
- [ ] Ensure test coverage is above 80%
26+
- [ ] Create initial binary releases for Linux, macOS, and Windows
27+
- [ ] Update README with beta installation instructions
28+
- [ ] Create migration guide for existing users
29+
- [ ] Set up GitHub issue template for beta feedback
30+
31+
### Beta 2
32+
33+
- [ ] Address feedback from Beta 1
34+
- [ ] Improve error messages and handling
35+
- [ ] Update Docker images and documentation
36+
- [ ] Add additional translation files if requested
37+
- [ ] Create detailed upgrade guide
38+
- [ ] Create tutorial video for new users
39+
40+
### Release Candidate 1
41+
42+
- [ ] Freeze feature development
43+
- [ ] Final polish of documentation
44+
- [ ] Complete API documentation
45+
- [ ] Resolve all critical and high-priority issues
46+
- [ ] Performance optimization
47+
- [ ] Final set of translation files
48+
49+
## Release Day Tasks
50+
51+
1. **Final Testing**
52+
53+
- [ ] Run all tests on all supported platforms
54+
- [ ] Verify Docker images work correctly
55+
- [ ] Test upgrade path from previous version
56+
57+
2. **Documentation**
58+
59+
- [ ] Update README for final release
60+
- [ ] Finalize release notes
61+
- [ ] Publish API documentation
62+
- [ ] Update website with new information
63+
64+
3. **Release Artifacts**
65+
66+
- [ ] Build and sign binaries for all platforms
67+
- [ ] Push Docker images to GitHub Container Registry
68+
- [ ] Create GitHub release with assets and release notes
69+
- [ ] Update Homebrew formula (if applicable)
70+
71+
4. **Announcement**
72+
- [ ] Publish release blog post
73+
- [ ] Announce on social media
74+
- [ ] Notify existing users via GitHub
75+
- [ ] Update relevant forums and communities
76+
77+
## Supported Platforms
78+
79+
### Binary Releases
80+
81+
- Linux (amd64, arm64, armv7)
82+
- macOS (amd64, arm64)
83+
- Windows (amd64)
84+
85+
### Docker Images
86+
87+
- Linux (amd64, arm64, armv7)
88+
89+
## Breaking Changes and Migration
90+
91+
Since this is a major version release with a complete rewrite, there are several breaking changes. A detailed migration guide is available at [MIGRATION_GUIDE.md](MIGRATION_GUIDE.md).
92+
93+
Key breaking changes include:
94+
95+
1. Configuration format changed from .env to TOML
96+
2. Command-line options structure has changed
97+
3. Output directory structure has been updated
98+
4. Docker image name has changed
99+
100+
## Rollback Plan
101+
102+
In case of critical issues after release:
103+
104+
1. Announce the issue on GitHub and social media
105+
2. Provide temporary workarounds if available
106+
3. Release a patch version (2.0.1) as soon as possible
107+
4. For severe issues, temporarily point Docker latest tag back to 1.x version
108+
109+
## Post-Release Tasks
110+
111+
1. **Week 1**
112+
113+
- [ ] Monitor GitHub issues for bug reports
114+
- [ ] Address critical bugs with immediate patch releases
115+
- [ ] Collect user feedback
116+
- [ ] Update documentation as needed
117+
118+
2. **Week 2-4**
119+
- [ ] Analyze usage patterns and metrics
120+
- [ ] Plan feature priorities for 2.1.0
121+
- [ ] Address non-critical bugs
122+
- [ ] Improve documentation based on common questions
123+
124+
## Future Roadmap (Post 2.0.0)
125+
126+
### Version 2.1.0 (Planned)
127+
128+
- OAuth authentication flow
129+
- Support for more Trakt.tv endpoints
130+
- Additional export filtering options
131+
132+
### Version 2.2.0 (Planned)
133+
134+
- Web UI for configuration
135+
- Additional export formats
136+
- Scheduled exports
137+
138+
### Version 2.3.0 (Planned)
139+
140+
- Integration with additional services
141+
- Bulk import/export features
142+
- Enhanced data visualization
143+
144+
## Measuring Success
145+
146+
The success of the 2.0.0 release will be measured by:
147+
148+
1. **User Adoption**
149+
150+
- Number of downloads of the new version
151+
- Docker pull statistics
152+
- GitHub stars and forks
153+
154+
2. **Stability**
155+
156+
- Number of bug reports post-release
157+
- Time to resolve critical issues
158+
- Test coverage percentage
159+
160+
3. **Performance**
161+
162+
- Export speed compared to 1.x version
163+
- Memory usage metrics
164+
- Error rates in production
165+
166+
4. **User Satisfaction**
167+
- GitHub discussions and feedback
168+
- Social media sentiment
169+
- Direct user feedback
170+
171+
## Conclusion
172+
173+
The 2.0.0 release represents a significant milestone for the Export_Trakt_4_Letterboxd project. The migration from Bash to Go provides a more robust, maintainable, and feature-rich foundation for the future.

0 commit comments

Comments
 (0)