Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ on:

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: darwin
- os: windows-latest
platform: win32
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
Expand All @@ -29,10 +38,10 @@ jobs:
run: npm run build --workspace=workspace-server

- name: Create release assets
run: npm run release
run: npm run release -- --platform=${{ matrix.platform }}

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/google-workspace-extension.tar.gz
files: release/${{ matrix.platform }}.google-workspace-extension.tar.gz
10 changes: 9 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ const deleteFilesByExtension = (dir, ext) => {
};

const main = async () => {
const name = 'google-workspace-extension';
const platform = argv.platform;
if (platform && typeof platform !== 'string') {
console.error(
'Error: The --platform argument must be a string (e.g., --platform=linux).'
);
process.exit(1);
}
const baseName = 'google-workspace-extension';
const name = platform ? `${platform}.${baseName}` : baseName;
const extension = 'tar.gz';

const rootDir = path.join(__dirname, '..');
Expand Down