Skip to content

Commit

Permalink
Publish source code in release assets
Browse files Browse the repository at this point in the history
Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
  • Loading branch information
OmkarPh committed Jan 8, 2024
1 parent 8b0703b commit 6064bb6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,28 @@ jobs:
node-version: 16.13.0
- name: Install dependencies
run: npm install
- name: Create release assets directory
run: mkdir -p dist
- name: Build Workbench & create archive for ${{ matrix.os }}
run: npm run publish
- name: Create source code tar including node_modules (MacOS & Linux)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
version=$(node -p "require('./package.json').version")
os=$(node -p "require('os').platform()")
arch=$(node -p "require('os').arch()")
tar -czf "dist/ScanCode-Workbench-${version}-${os}-${arch}-src.tar.gz" --exclude={out,dist,.git} .
- name: Create source code zip including node_modules (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:version=$(node -p "require('./package.json').version")
$env:os=$(node -p "require('os').platform()")
$env:arch=$(node -p "require('os').arch()")
powershell Compress-Archive * "dist/ScanCode-Workbench-${env:version}-${env:os}-${env:arch}-src.zip" -Exclude "out", "dist", ".git"
- name: Verify Generated archive in dist/
run: ls ./dist
- name: Upload release assets
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
files: dist/*
files: dist/*
3 changes: 1 addition & 2 deletions src/components/ImportFallback/ImportFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const ImportFallback = () => {
</Link>
<h2>
Please {" "}
<Link to={ROUTES.HOME}>import a scan</Link> {" "}
to view this page
<Link to={ROUTES.HOME}>import a scan</Link>
</h2>
</div>
</div>
Expand Down

0 comments on commit 6064bb6

Please sign in to comment.