Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c7fa431
created new release using workflows and deleted old one
eyalk007 Oct 28, 2025
a748238
Fix Frogbot Scan-pr broken tests (#944)
eranturgeman Oct 30, 2025
8777a7b
Change release workflow to use ubuntu-latest runner
eyalk007 Nov 2, 2025
57dba96
Restore release/buildAndUpload.sh script
eyalk007 Nov 2, 2025
254b518
gave frogbot the needed thread count to run in parallel (#942)
eyalk007 Nov 2, 2025
3a8e8fe
Fix JFrog CLI installation - remove redundant chmod and mv
eyalk007 Nov 2, 2025
8291093
Use JF_ACCESS_TOKEN instead of JF_USER and JF_PASSWORD
eyalk007 Nov 2, 2025
0585d57
Add JF_URL and JF_ACCESS_TOKEN env vars to audit step for proper auth…
eyalk007 Nov 2, 2025
6cb6e1c
Fix Prettier formatting in action tests
eyalk007 Nov 2, 2025
3c4be11
Fix buildAndUpload.sh to use dynamic major version (v3) and allow cus…
eyalk007 Nov 2, 2025
e2925ed
Comment out Go virtual repo config and set local repo for uploads
eyalk007 Nov 2, 2025
23c4b83
Revert repo name change and fix audit to non-blocking (--fail=false) …
eyalk007 Nov 2, 2025
68780a8
Restore jf goc command - required for jf go build in buildAndUpload.sh
eyalk007 Nov 2, 2025
fe0786c
Use ecosys-go-virtual to match original release pipeline
eyalk007 Nov 2, 2025
571950e
Fix Python descriptor file resolution bug (#963)
kerenr-jfrog Nov 17, 2025
33e2e00
new dependencies (#969)
orto17 Nov 20, 2025
893d9df
changed release method
eyalk007 Nov 23, 2025
12bdddc
Merge branch 'jfrog:master' into create-new-release
eyalk007 Nov 23, 2025
f48bf95
Add manual trigger for release workflow with version validation
eyalk007 Nov 23, 2025
040402e
Parallelize binary builds using Go goroutines
eyalk007 Nov 24, 2025
512e2d8
Parallelize binary builds using bash background jobs
eyalk007 Nov 24, 2025
282c943
Fix parallel build race condition
eyalk007 Nov 24, 2025
024f2dc
Pre-download Go dependencies before parallel builds
eyalk007 Nov 24, 2025
47eb21c
Replace JFrog Audit with Frogbot scan (dogfooding)
eyalk007 Nov 24, 2025
2f21dc6
Remove pre-download step and clean up Frogbot step name
eyalk007 Nov 24, 2025
9670eb9
Use Frogbot action instead of building manually
eyalk007 Nov 24, 2025
95dd5a2
Add JF_SKIP_AUTOFIX flag to prevent Frogbot from creating fix PRs
eyalk007 Nov 24, 2025
edfd425
Optimize build: replace jf go build with regular go build
eyalk007 Nov 24, 2025
f048988
Revert "Optimize build: replace jf go build with regular go build"
eyalk007 Nov 24, 2025
3ff277a
Change runner to self-hosted for release job
eyalk007 Dec 23, 2025
94ff4b3
Fix release workflow: install Node.js before Frogbot scan, add releas…
eyalk007 Dec 23, 2025
6670adc
Separate distribution token from Artifactory token
eyalk007 Dec 23, 2025
8c45e42
Use jf use instead of --server-id for cleaner distribution commands
eyalk007 Dec 23, 2025
886a9a9
Revert to single token approach like old CD pipeline
eyalk007 Dec 23, 2025
f77089d
Support pre-release versions like v3.0.0-testing
eyalk007 Dec 23, 2025
3929af3
Temporarily add push trigger for testing
eyalk007 Dec 24, 2025
2b9b3f8
Force CreateAutoFixPr to false when using config profile
eyalk007 Dec 31, 2025
d1c4f69
Merge v3_er into create-new-release
eyalk007 Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
290 changes: 290 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
name: Release Frogbot

on:
push:
branches:
- create-new-release
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 3.0.1)'
required: true
type: string

# Required permissions
permissions:
contents: write
actions: read

jobs:
release:
name: Release Frogbot v3
runs-on: self-hosted

steps:
- name: Extract version from tag
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
# Manual trigger: use input version
VERSION="${{ inputs.version }}"
# Add 'v' prefix if not present
if [[ ! "$VERSION" =~ ^v ]]; then
TAG="v$VERSION"
else
TAG="$VERSION"
VERSION="${VERSION#v}"
fi
elif [ "${{ github.event_name }}" == "push" ]; then
# Push trigger: use test version with timestamp
VERSION="3.0.0-test-$(date +%s)"
TAG="v$VERSION"

# Validate it's a v3.x.x version (allows pre-release suffixes like -testing, -alpha, etc.)
if [[ ! "$TAG" =~ ^v3\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then
echo "❌ Error: Version must be v3.x.x format (e.g., v3.0.1, v3.0.0-testing)"
echo "Got: $TAG"
exit 1
fi
else
# Release trigger: use release tag
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "✅ Release version: $VERSION"
echo "✅ Release tag: $TAG"

- name: Check if tag already exists
if: github.event_name == 'workflow_dispatch'
uses: actions/github-script@v7
with:
script: |
const tag = '${{ steps.version.outputs.tag }}';

try {
// Check if tag exists
await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `tags/${tag}`
});

// Tag exists - fail the workflow
core.setFailed(`❌ Tag ${tag} already exists! Please use a different version.`);
} catch (error) {
if (error.status === 404) {
// Tag doesn't exist - good to proceed
console.log(`✅ Tag ${tag} does not exist, proceeding with release`);
} else {
// Some other error
throw error;
}
}

- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || github.event.release.tag_name }}
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true

- name: Download JFrog CLI
run: |
curl -fL https://install-cli.jfrog.io | sh
# The install script already moves jf to /usr/local/bin/

- name: Configure JFrog CLI
env:
JF_URL: ${{ secrets.JF_URL }}
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
run: |
jf c rm --quiet || true
jf c add internal --url="$JF_URL" --access-token="$JF_ACCESS_TOKEN"
jf goc --repo-resolve ecosys-go-virtual

- name: Generate mocks
run: go generate ./...

- name: Set up Node.js for Action
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: action/package-lock.json

- name: Run Frogbot scan before release
uses: jfrog/frogbot@v2
env:
JF_URL: ${{ secrets.JF_URL }}
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JF_GIT_BASE_BRANCH: ${{ github.ref_name }}
JF_FAIL: "true"
JF_SKIP_AUTOFIX: "true"

- name: Build GitHub Action
working-directory: action
run: |
npm ci --ignore-scripts
npm run compile
npm run format-check
npm test

- name: Commit and update tag with compiled action
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add action/lib/

# Check if there are changes
CHANGES=false
if ! git diff --staged --quiet; then
echo "Action files changed, committing..."
git commit -m "Build action for ${{ steps.version.outputs.tag }}"
CHANGES=true
else
echo "No changes to action files"
fi

# For manual triggers, always create/update the tag
# For release triggers, update the tag only if there were changes
if [ "${{ github.event_name }}" == "workflow_dispatch" ] || [ "$CHANGES" = "true" ]; then
echo "Creating/updating tag ${{ steps.version.outputs.tag }}..."
git tag -f ${{ steps.version.outputs.tag }}
git push origin ${{ steps.version.outputs.tag }} --force
echo "Tag ${{ steps.version.outputs.tag }} created/updated"
fi

- name: Update GitHub Action major version tag (v3)
run: |
# Update v3 tag to point to the latest v3.x.x release
git tag -f v3
git push origin v3 --force
echo "Updated v3 tag to ${{ steps.version.outputs.tag }}"

- name: Build and upload binaries (parallel)
env:
VERSION: ${{ steps.version.outputs.tag }}
JFROG_CLI_BUILD_NAME: ecosystem-frogbot-release
JFROG_CLI_BUILD_NUMBER: ${{ github.run_number }}
JFROG_CLI_BUILD_PROJECT: ecosys
run: |
env -i PATH=$PATH HOME=$HOME \
JFROG_CLI_BUILD_NAME=$JFROG_CLI_BUILD_NAME \
JFROG_CLI_BUILD_NUMBER=$JFROG_CLI_BUILD_NUMBER \
JFROG_CLI_BUILD_PROJECT=$JFROG_CLI_BUILD_PROJECT \
CI=true \
release/buildAndUpload.sh "${{ steps.version.outputs.version }}"

- name: Publish build info
env:
JFROG_CLI_BUILD_NAME: ecosystem-frogbot-release
JFROG_CLI_BUILD_NUMBER: ${{ github.run_number }}
JFROG_CLI_BUILD_PROJECT: ecosys
run: |
jf rt bag
jf rt bce
jf rt bp

- name: Create and distribute release bundle
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
# Use same JFrog CLI config (internal) for distribution
jf ds rbc ecosystem-frogbot $VERSION \
--spec="release/specs/frogbot-rbc-spec.json" \
--spec-vars="VERSION=$VERSION" \
--sign
jf ds rbd ecosystem-frogbot $VERSION \
--site="releases.jfrog.io" \
--sync

- name: Create GitHub Release
if: github.event_name == 'workflow_dispatch'
uses: actions/github-script@v7
with:
script: |
const tag = '${{ steps.version.outputs.tag }}';

// Check if this is a pre-release version (contains hyphen like v3.0.0-testing)
const isPrerelease = tag.includes('-');

console.log(`Creating release for tag ${tag}`);
if (isPrerelease) {
console.log(`⚠️ This will be marked as a pre-release`);
}

// The tag was already created and pushed in the previous step
// Now create the release with auto-generated notes
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: tag,
name: `Release ${tag}`,
generate_release_notes: true,
draft: false,
prerelease: isPrerelease,
make_latest: false
});

console.log(`✅ Created release ${release.data.id} for ${tag}`);
console.log(`📦 Release URL: ${release.data.html_url}`);
console.log(`ℹ️ This release is NOT marked as "Latest"`);

- name: Cleanup JFrog config
if: always()
run: jf c rm --quiet || true

# On failure: delete release and tag
- name: Delete release on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
const tag = '${{ steps.version.outputs.tag }}';

console.log(`Workflow failed, cleaning up tag ${tag}`);

try {
// Try to find and delete the release
const releases = await github.rest.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo
});

const release = releases.data.find(r => r.tag_name === tag);
if (release) {
console.log(`Deleting release ${release.id}`);
await github.rest.repos.deleteRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id
});
console.log('Release deleted');
} else {
console.log('No release found to delete');
}

// Delete the tag
try {
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `tags/${tag}`
});
console.log('Tag deleted');
} catch (error) {
console.log(`Tag deletion failed or tag doesn't exist: ${error.message}`);
}
} catch (error) {
console.error(`Cleanup failed: ${error.message}`);
// Don't fail the workflow if cleanup fails
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions action/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion action/test/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ describe('Frogbot Action Tests', () => {
describe('Frogbot URL Tests', () => {
const myOs: jest.Mocked<typeof os> = os as any;
let cases: string[][] = [
['win32' as NodeJS.Platform, 'amd64', 'jfrog.exe', 'https://releases.jfrog.io/artifactory/frogbot/v1/1.2.3/frogbot-windows-amd64/jfrog.exe',],
[
'win32' as NodeJS.Platform,
'amd64',
'jfrog.exe',
'https://releases.jfrog.io/artifactory/frogbot/v1/1.2.3/frogbot-windows-amd64/jfrog.exe',
],
['darwin' as NodeJS.Platform, 'amd64', 'jfrog', 'https://releases.jfrog.io/artifactory/frogbot/v1/1.2.3/frogbot-mac-386/jfrog'],
['darwin' as NodeJS.Platform, 'arm64', 'jfrog', 'https://releases.jfrog.io/artifactory/frogbot/v1/1.2.3/frogbot-mac-arm64/jfrog'],
['linux' as NodeJS.Platform, 'amd64', 'jfrog', 'https://releases.jfrog.io/artifactory/frogbot/v1/1.2.3/frogbot-linux-amd64/jfrog'],
Expand Down
Loading
Loading