OXYGENHUB
# dab94366a4f0 oxygen / vendor / crc-fast / .kiro / specs / github-release-automation / tasks.md
6.0 KiB · Markdown · last changed Strata: the cloud stores send through ureq, so every release target links 1 month ago renderedsource blame history raw
1
# Implementation Plan
2
3
- [x] 1. Create GitHub Actions release workflow file
4
  - Create `.github/workflows/release.yml` with workflow structure
5
  - Configure workflow to trigger on tags matching `[0-9]+.[0-9]+.[0-9]+` pattern
6
  - Set up workflow permissions for creating releases and uploading assets
7
  - _Requirements: 1.1, 6.5_
8
9
- [x] 2. Implement validation job
10
  - [x] 2.1 Create validate job that waits for test workflow completion
11
    - Use `lewagon/wait-on-check-action` or similar to wait for test workflow to complete
12
    - Poll test workflow status until it completes (success or failure)
13
    - Fail the validate job if test workflow fails
14
    - Set reasonable timeout (e.g., 60 minutes) to prevent infinite waiting
15
    - _Requirements: 6.1, 6.3_
16
17
  - [x] 2.2 Add quality checks to validate job
18
    - Run `cargo fmt --check` to verify code formatting
19
    - Run `cargo clippy -- -D warnings` to catch linting issues
20
    - _Requirements: 6.4_
21
22
- [x] 3. Implement build matrix job
23
  - [x] 3.1 Define build matrix with all target platforms
24
    - Configure matrix with 5 targets: x86_64-linux, aarch64-linux, aarch64-macos, x86_64-windows, aarch64-windows
25
    - Map each target to appropriate runner: ubuntu-22.04, ubuntu-22.04-arm, macos-14, windows-2022, windows-11-arm
26
    - Include platform, arch, and extension variables in matrix
27
    - _Requirements: 1.2_
28
29
  - [x] 3.2 Set up Rust toolchain in build job
30
    - Use `actions-rust-lang/setup-rust-toolchain` action
31
    - Configure stable toolchain
32
    - _Requirements: 6.2_
33
34
  - [x] 3.3 Build release binaries
35
    - Run `cargo build --release` to build library and CLI binaries
36
    - Verify all expected files exist in target/release directory
37
    - _Requirements: 1.4, 2.1, 3.1_
38
39
- [x] 4. Create platform-specific package staging
40
  - [x] 4.1 Implement Linux package staging
41
    - Create directory structure: lib/, include/, bin/
42
    - Copy libcrc_fast.so and libcrc_fast.a to lib/
43
    - Copy libcrc_fast.h to include/
44
    - Copy checksum, arch-check, get-custom-params to bin/
45
    - Set executable permissions on binaries
46
    - _Requirements: 2.2, 3.2, 3.4, 4.1, 4.4_
47
48
  - [x] 4.2 Implement macOS package staging
49
    - Create directory structure: lib/, include/, bin/
50
    - Copy libcrc_fast.dylib and libcrc_fast.a to lib/
51
    - Copy libcrc_fast.h to include/
52
    - Copy checksum, arch-check, get-custom-params to bin/
53
    - Set executable permissions on binaries
54
    - _Requirements: 2.3, 3.2, 3.4, 4.2, 4.4_
55
56
  - [x] 4.3 Implement Windows package staging
57
    - Create directory structure: bin/, lib/, include/
58
    - Copy crc_fast.dll to bin/
59
    - Copy crc_fast.dll.lib and crc_fast.lib to lib/
60
    - Copy libcrc_fast.h to include/
61
    - Copy checksum.exe, arch-check.exe, get-custom-params.exe to bin/
62
    - _Requirements: 2.4, 3.3, 4.3, 4.5_
63
64
- [ ] 5. Add package metadata files
65
  - [x] 5.1 Create VERSION file
66
    - Extract version from git tag
67
    - Write version number to VERSION file in package root
68
    - _Requirements: 7.1_
69
70
  - [x] 5.2 Create README.txt file
71
    - Generate platform-specific installation instructions
72
    - Include basic usage information and link to documentation
73
    - Add to package root
74
    - _Requirements: 7.2_
75
76
  - [x] 5.3 Copy license files
77
    - Copy LICENSE-MIT and LICENSE-Apache to package root
78
    - _Requirements: 7.3_
79
80
- [x] 6. Create compressed packages
81
  - [x] 6.1 Implement tar.gz creation for Linux and macOS
82
    - Use tar command to create compressed archive
83
    - Name package: crc-fast-{version}-{platform}-{arch}.tar.gz
84
    - _Requirements: 5.2, 5.3, 5.5_
85
86
  - [x] 6.2 Implement zip creation for Windows
87
    - Use PowerShell Compress-Archive or 7zip
88
    - Name package: crc-fast-{version}-windows-{arch}.zip
89
    - _Requirements: 5.4, 5.5_
90
91
- [X] 7. Generate and upload checksums
92
  - [x] 7.1 Generate SHA256 checksums
93
    - Calculate SHA256 hash for each package
94
    - Create .sha256 file with hash and filename
95
    - _Requirements: 7.4_
96
97
  - [x] 7.2 Upload packages and checksums as artifacts
98
    - Use `actions/upload-artifact` to upload package files
99
    - Upload checksum files as separate artifacts
100
    - _Requirements: 7.5_
101
102
- [X] 8. Implement publish job
103
  - [x] 8.1 Download all build artifacts
104
    - Use `actions/download-artifact` to retrieve all packages and checksums
105
    - Organize files for upload
106
    - _Requirements: 1.5_
107
108
  - [x] 8.2 Check for existing release
109
    - Use GitHub API to check if release exists for the tag
110
    - Get release ID if it exists
111
    - _Requirements: Decision 9_
112
113
  - [x] 8.3 Create or update GitHub release
114
    - If release doesn't exist, create new release with basic information
115
    - If release exists, prepare to update it with assets
116
    - Use `softprops/action-gh-release` or similar action
117
    - _Requirements: 1.5_
118
119
  - [x] 8.4 Upload packages and checksums to release
120
    - Upload all .tar.gz and .zip packages as release assets
121
    - Upload all .sha256 checksum files as release assets
122
    - _Requirements: 1.5, 7.5_
123
124
- [ ]* 9. Add workflow documentation
125
  - [ ]* 9.1 Create workflow README
126
    - Document how to trigger releases
127
    - Explain manual release creation workflow
128
    - Document package naming conventions
129
    - _Requirements: All_
130
131
  - [ ]* 9.2 Add inline workflow comments
132
    - Comment complex workflow steps
133
    - Explain matrix configuration
134
    - Document platform-specific logic
135
    - _Requirements: All_
136
137
- [ ]* 10. Test release workflow
138
  - [ ]* 10.1 Test on feature branch
139
    - Create test tag on feature branch
140
    - Verify workflow triggers correctly
141
    - Check that all jobs complete successfully
142
    - _Requirements: All_
143
144
  - [ ]* 10.2 Validate package contents
145
    - Download each platform package
146
    - Extract and verify directory structure
147
    - Check that all files are present
148
    - Verify file permissions on Unix platforms
149
    - _Requirements: 2.1-2.5, 3.1-3.4, 4.1-4.5, 7.1-7.3_
150
151
  - [ ]* 10.3 Test package functionality
152
    - Test linking against dynamic library
153
    - Test linking against static library
154
    - Run each CLI binary to verify functionality
155
    - Verify checksums match package contents
156
    - _Requirements: 2.1-2.5, 3.1-3.4_