Skip to content

Commit 4f7aa81

Browse files
authored
Merge pull request #6 from rdbumstead/feat/v2.1.0-release
feat: Release v2.1.0 - Multi-Auth Support, Cache Granularity, and Docs Overhaul
2 parents 4fa70a2 + 3dd0d5a commit 4f7aa81

11 files changed

Lines changed: 917 additions & 766 deletions

File tree

.github/workflows/test.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,111 @@ jobs:
271271
echo "✅ Cache behavior test completed"
272272
echo "Check action logs to verify cache hit on second run"
273273
274+
test-cache-granularity:
275+
name: Cache Granularity (v2.1)
276+
runs-on: ubuntu-latest
277+
278+
steps:
279+
- name: Checkout
280+
uses: actions/checkout@v4
281+
282+
- name: Setup with Major Cache Granularity
283+
id: setup-major
284+
uses: ./
285+
with:
286+
skip_auth: "true"
287+
cli_version_for_cache: "major"
288+
289+
- name: Setup with Minor Cache Granularity
290+
id: setup-minor
291+
uses: ./
292+
with:
293+
skip_auth: "true"
294+
cli_version_for_cache: "minor"
295+
296+
- name: Setup with Exact Cache Granularity
297+
id: setup-exact
298+
uses: ./
299+
with:
300+
skip_auth: "true"
301+
cli_version_for_cache: "exact"
302+
303+
- name: Verify
304+
run: |
305+
echo "✅ Cache granularity test completed"
306+
echo "All three granularity options accepted: major, minor, exact"
307+
308+
test-sfdx-url-auth:
309+
name: SFDX Auth URL (v2.1)
310+
runs-on: ubuntu-latest
311+
if: github.repository_owner == 'rdbumstead' || github.event_name == 'workflow_dispatch'
312+
313+
steps:
314+
- name: Checkout
315+
uses: actions/checkout@v4
316+
317+
- name: Setup with SFDX Auth URL
318+
id: setup-sfdx-url
319+
uses: ./
320+
with:
321+
auth_method: "sfdx-url"
322+
sfdx_auth_url: ${{ secrets.SFDX_AUTH_URL }}
323+
324+
- name: Verify SFDX URL Auth
325+
run: |
326+
echo "Testing SFDX Auth URL authentication..."
327+
sf org display
328+
329+
echo "Verifying outputs..."
330+
echo "Org ID: ${{ steps.setup-sfdx-url.outputs.org_id }}"
331+
echo "Auth Performed: ${{ steps.setup-sfdx-url.outputs.auth_performed }}"
332+
echo "API Version: ${{ steps.setup-sfdx-url.outputs.api_version }}"
333+
334+
if [ -z "${{ steps.setup-sfdx-url.outputs.org_id }}" ]; then
335+
echo "❌ org_id output is empty"
336+
exit 1
337+
fi
338+
339+
echo "✅ SFDX Auth URL authentication successful"
340+
341+
test-new-outputs:
342+
name: New Outputs (v2.1)
343+
runs-on: ubuntu-latest
344+
if: github.repository_owner == 'rdbumstead' || github.event_name == 'workflow_dispatch'
345+
346+
steps:
347+
- name: Checkout
348+
uses: actions/checkout@v4
349+
350+
- name: Setup Salesforce
351+
id: setup-sf
352+
uses: ./
353+
with:
354+
jwt_key: ${{ secrets.SFDX_JWT_KEY }}
355+
client_id: ${{ secrets.SFDX_CLIENT_ID }}
356+
username: ${{ vars.SFDX_USERNAME }}
357+
358+
- name: Verify New Outputs
359+
run: |
360+
echo "Testing new v2.1 outputs..."
361+
362+
echo "api_version: ${{ steps.setup-sf.outputs.api_version }}"
363+
echo "auth_performed: ${{ steps.setup-sf.outputs.auth_performed }}"
364+
365+
# Verify api_version is not empty
366+
if [ -z "${{ steps.setup-sf.outputs.api_version }}" ]; then
367+
echo "❌ api_version output is empty"
368+
exit 1
369+
fi
370+
371+
# Verify auth_performed is true
372+
if [ "${{ steps.setup-sf.outputs.auth_performed }}" != "true" ]; then
373+
echo "❌ auth_performed should be 'true'"
374+
exit 1
375+
fi
376+
377+
echo "✅ New outputs verified"
378+
274379
test-network-retry:
275380
name: Network Retry Logic
276381
runs-on: ubuntu-latest
@@ -376,6 +481,9 @@ jobs:
376481
- test-custom-alias
377482
- test-error-handling
378483
- test-cache-behavior
484+
- test-cache-granularity
485+
- test-sfdx-url-auth
486+
- test-new-outputs
379487
- test-network-retry
380488
- test-invalid-plugins
381489
- test-source-flags
@@ -462,6 +570,32 @@ jobs:
462570
echo "❌ **Source Flags Output**: Failed" >> $GITHUB_STEP_SUMMARY
463571
fi
464572
573+
echo "" >> $GITHUB_STEP_SUMMARY
574+
echo "### v2.1 Features" >> $GITHUB_STEP_SUMMARY
575+
echo "" >> $GITHUB_STEP_SUMMARY
576+
577+
if [ "${{ needs.test-cache-granularity.result }}" = "success" ]; then
578+
echo "✅ **Cache Granularity**: Passed" >> $GITHUB_STEP_SUMMARY
579+
else
580+
echo "❌ **Cache Granularity**: Failed" >> $GITHUB_STEP_SUMMARY
581+
fi
582+
583+
if [ "${{ needs.test-sfdx-url-auth.result }}" = "success" ]; then
584+
echo "✅ **SFDX Auth URL**: Passed" >> $GITHUB_STEP_SUMMARY
585+
elif [ "${{ needs.test-sfdx-url-auth.result }}" = "skipped" ]; then
586+
echo "⏭️ **SFDX Auth URL**: Skipped (no secrets)" >> $GITHUB_STEP_SUMMARY
587+
else
588+
echo "❌ **SFDX Auth URL**: Failed" >> $GITHUB_STEP_SUMMARY
589+
fi
590+
591+
if [ "${{ needs.test-new-outputs.result }}" = "success" ]; then
592+
echo "✅ **New Outputs (v2.1)**: Passed" >> $GITHUB_STEP_SUMMARY
593+
elif [ "${{ needs.test-new-outputs.result }}" = "skipped" ]; then
594+
echo "⏭️ **New Outputs (v2.1)**: Skipped (no secrets)" >> $GITHUB_STEP_SUMMARY
595+
else
596+
echo "❌ **New Outputs (v2.1)**: Failed" >> $GITHUB_STEP_SUMMARY
597+
fi
598+
465599
echo "" >> $GITHUB_STEP_SUMMARY
466600
echo "---" >> $GITHUB_STEP_SUMMARY
467601
echo "" >> $GITHUB_STEP_SUMMARY
@@ -502,6 +636,11 @@ jobs:
502636
CRITICAL_FAILED=true
503637
fi
504638
639+
if [ "${{ needs.test-cache-granularity.result }}" != "success" ]; then
640+
echo "❌ Critical test failed: Cache Granularity"
641+
CRITICAL_FAILED=true
642+
fi
643+
505644
if [ "$CRITICAL_FAILED" = true ]; then
506645
echo ""
507646
echo "❌ One or more critical tests failed"

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2026-01-15
9+
10+
### Added - Multiple Authentication Methods 🔐
11+
12+
- **SFDX Auth URL authentication** (`auth_method: 'sfdx-url'`)
13+
14+
- Simpler alternative to JWT - no certificate required
15+
- Uses refresh token from SFDX Auth URL
16+
- New input: `sfdx_auth_url`
17+
18+
- **Access Token authentication** (`auth_method: 'access-token'`)
19+
20+
- Direct access token authentication for advanced use cases
21+
- New input: `access_token`
22+
- Warning: Access tokens are short-lived
23+
24+
- **New `auth_method` input** to select authentication type
25+
- Options: `jwt` (default), `sfdx-url`, `access-token`
26+
- Backward compatible - existing JWT workflows work unchanged
27+
28+
### Added - Cache Granularity Control ⚡
29+
30+
- **New `cli_version_for_cache` input** to control cache key granularity
31+
- `major` - Cache busts only on major CLI version changes
32+
- `minor` - Cache busts on minor version changes (default)
33+
- `exact` - Cache busts on every CLI version change
34+
- Improves cache hit rates for teams using `cli_version: 'latest'`
35+
36+
### Added - New Outputs 📊
37+
38+
- **`api_version`** - Salesforce API version for the authenticated org
39+
- **`auth_performed`** - Whether authentication was performed (`true`/`false`)
40+
41+
### Changed - Improvements
42+
43+
- Cache key format updated to `sf-v3-*` for new cache strategy
44+
- Improved sandbox and scratch org detection logic
45+
- Better logging with tree-formatted output
46+
- Environment variables used for sensitive auth data (more secure)
47+
48+
### Fixed 🐞
49+
50+
- Custom plugin installation loop now correctly installs plugins
51+
52+
---
53+
854
## [2.0.1] - 2026-01-15
955

1056
### Fixed 🐞
@@ -156,6 +202,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
156202

157203
---
158204

205+
[2.1.0]: https://github.com/rdbumstead/setup-salesforce-action/releases/tag/v2.1.0
206+
[2.0.1]: https://github.com/rdbumstead/setup-salesforce-action/releases/tag/v2.0.1
159207
[2.0.0]: https://github.com/rdbumstead/setup-salesforce-action/releases/tag/v2.0.0
160208
[1.1.1]: https://github.com/rdbumstead/setup-salesforce-action/releases/tag/v1.1.1
161209
[1.1.0]: https://github.com/rdbumstead/setup-salesforce-action/releases/tag/v1.1.0

0 commit comments

Comments
 (0)