dirfy 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +114 -2
- data/lib/dirfy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2280485e374e77646217758bb7ff581745d1027c716de33bbf180532c37099d5
|
|
4
|
+
data.tar.gz: 9ce1d4d53bb3bc4f1c6d4b39bbf0d9dca6a73f0c50ecd2a28a089af2301076fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57c73e9a491dd9ad6ca56cceb0e7d16bdcfc65524b93e331f4008eebea5d77a5d27e9775553cf354adeaa809e75c1a174133a5a4542ccc18a15a139b8af53af5
|
|
7
|
+
data.tar.gz: ef290b90b405d6151738c97bede4e2778c437394865ed42830849e3fb0d5b4ebbff7f287bcbeaf7ce198b0b05a95c9ec03e94a0b3dcac015a792d5629530c8c4
|
data/README.md
CHANGED
|
@@ -129,10 +129,122 @@ Happy scaffolding! 🚀
|
|
|
129
129
|
|
|
130
130
|
---
|
|
131
131
|
|
|
132
|
-
##
|
|
132
|
+
## � Release Process
|
|
133
|
+
|
|
134
|
+
This section documents the release process for maintainers.
|
|
135
|
+
|
|
136
|
+
### Prerequisites
|
|
137
|
+
|
|
138
|
+
- Push access to the repository
|
|
139
|
+
- RubyGems account with push access to the `dirfy` gem
|
|
140
|
+
- 2FA enabled on RubyGems account
|
|
141
|
+
|
|
142
|
+
### Release Steps
|
|
143
|
+
|
|
144
|
+
1. **Run tests and ensure clean state**
|
|
145
|
+
```bash
|
|
146
|
+
bundle exec rake
|
|
147
|
+
git status # should be clean
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
2. **Update version**
|
|
151
|
+
```bash
|
|
152
|
+
# Edit lib/dirfy/version.rb
|
|
153
|
+
vim lib/dirfy/version.rb
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
3. **Commit version bump**
|
|
157
|
+
```bash
|
|
158
|
+
git add lib/dirfy/version.rb Gemfile.lock
|
|
159
|
+
git commit -m "chore: bump version to vX.Y.Z"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
4. **Create and push tag**
|
|
163
|
+
```bash
|
|
164
|
+
git tag vX.Y.Z
|
|
165
|
+
git push origin main
|
|
166
|
+
git push origin vX.Y.Z
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
5. **Build and publish gem**
|
|
170
|
+
```bash
|
|
171
|
+
rake build
|
|
172
|
+
gem push pkg/dirfy-X.Y.Z.gem
|
|
173
|
+
# Follow 2FA authentication flow
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
6. **Create GitHub release**
|
|
177
|
+
```bash
|
|
178
|
+
gh release create vX.Y.Z pkg/dirfy-X.Y.Z.gem \
|
|
179
|
+
--title "vX.Y.Z" \
|
|
180
|
+
--notes "Release notes here"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Automated Release (Helper Script)
|
|
184
|
+
|
|
185
|
+
Use the provided release script for semi-automated releases:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
./scripts/release.sh patch # for patch version (0.0.X)
|
|
189
|
+
./scripts/release.sh minor # for minor version (0.X.0)
|
|
190
|
+
./scripts/release.sh major # for major version (X.0.0)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Troubleshooting
|
|
194
|
+
|
|
195
|
+
- **2FA Authentication**: RubyGems requires 2FA. Use WebAuthn or `--otp` flag
|
|
196
|
+
- **Workflow scope**: GitHub token needs `workflow` scope to modify Actions
|
|
197
|
+
- **Permission denied**: Ensure you have push access to both repo and RubyGems
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## �📝 License
|
|
133
202
|
|
|
134
203
|
MIT © [Ahmed Elhady](https://github.com/ahmedmelhady7)
|
|
135
204
|
|
|
136
205
|
---
|
|
137
206
|
|
|
138
|
-
> Built with ❤️ to make AI-generated project scaffolding a breeze.
|
|
207
|
+
> Built with ❤️ to make AI-generated project scaffolding a breeze.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Release steps
|
|
212
|
+
|
|
213
|
+
This project supports both local and GitHub Actions-based releases. The workflow `/.github/workflows/release.yml` will publish a built gem when a `vX.Y.Z` tag is pushed, but the runner needs a valid `RUBYGEMS_API_KEY` secret and the repository maintainer must ensure the CI token can run workflow jobs that modify releases.
|
|
214
|
+
|
|
215
|
+
Local release (recommended when you need to provide 2FA interactively):
|
|
216
|
+
|
|
217
|
+
1. Bump the version in `lib/dirfy/version.rb` (e.g. `0.3.0`).
|
|
218
|
+
2. Build the gem locally:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
bundle install
|
|
222
|
+
bundle exec rake build
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
3. Create a git tag and push it (this will trigger CI if configured):
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
git add -A
|
|
229
|
+
git commit -m "Release vX.Y.Z"
|
|
230
|
+
git tag vX.Y.Z
|
|
231
|
+
git push origin main --follow-tags
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
4. Publish the gem to RubyGems interactively (you may need to complete 2FA):
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
gem push pkg/dirfy-X.Y.Z.gem
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
CI-based release (recommended for automated releases):
|
|
241
|
+
|
|
242
|
+
1. Ensure the repository has the secret `RUBYGEMS_API_KEY` configured in GitHub Settings → Secrets.
|
|
243
|
+
2. Ensure the repository's token has appropriate permissions to run workflow jobs that create or update releases (the token needs `workflow` scope to update workflows).
|
|
244
|
+
3. Push a tag `vX.Y.Z` to the repo. The `release.yml` workflow will build and push the gem.
|
|
245
|
+
|
|
246
|
+
Notes and troubleshooting
|
|
247
|
+
|
|
248
|
+
- If you see an error like `Invalid credentials (401)` during `gem push` in CI, double-check that `RUBYGEMS_API_KEY` is correctly set and that the CI runner writes it to `~/.gem/credentials` before pushing.
|
|
249
|
+
- If GitHub rejects pushes that modify workflow files, ensure the token used has `workflow` scope or make the workflow change via the GitHub web UI.
|
|
250
|
+
- For local gem publishing, if 2FA is enabled you will be prompted to authenticate in your browser or provide an OTP.
|
data/lib/dirfy/version.rb
CHANGED