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
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
shell: bash
run: echo "Building from branch=$(git rev-parse --abbrev-ref HEAD), commit=$(git rev-parse HEAD), tag=$(git describe --tags --exact-match)"

- name: Setup Node.js ${{ needs.get-configs.outputs.node-version }} (${{ inputs.runs-on }}-${{ inputs.arch }})
- name: Setup Node.js ${{ needs.get-configs.outputs.node-version }} (${{ runner.os }}-${{ runner.arch }})
uses: actions/setup-node@v4
with:
node-version: ${{ needs.get-configs.outputs.node-version }}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
shell: bash
run: echo "Building from branch=$(git rev-parse --abbrev-ref HEAD), commit=$(git rev-parse HEAD), tag=$(git describe --tags --exact-match)"

- name: Setup Go ${{ needs.get-configs.outputs.go-version }} (${{ inputs.runs-on }}-${{ inputs.arch }})
- name: Setup Go ${{ needs.get-configs.outputs.go-version }} (${{ runner.os }}-${{ runner.arch }})
uses: actions/setup-go@v4
with:
go-version: ${{ needs.get-configs.outputs.go-version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
JSON_STRING=$(cat <<EOF
{
"include": [
{ "runner": "ubuntu-latest", "arch": "x64", name: "linux" },
{ "runner": "macos-latest", "arch": "x64", name: "darwin" },
{ "runner": "macos-latest", "arch": "arm64", name: "darwin" },
{ "runner": "windows-latest", "arch": "x64", name: "windows" },
{ "runner": "ubuntu-latest", "arch": "x64" },
{ "runner": "macos-latest", "arch": "x64" },
{ "runner": "macos-latest", "arch": "arm64" },
{ "runner": "windows-latest", "arch": "x64" },
]
}
EOF
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.tag }}
fetch-tags: true

- name: Get version from package.json
id: get-version
Expand All @@ -49,7 +50,7 @@ jobs:
if [[ "$TAG" == "v$VERSION" ]]; then
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "is-prerelease=false" >> $GITHUB_OUTPUT
elif [[ "$TAG" =~ ^v$VERSION-[a-zA-Z0-9]+$ ]]; then
elif [[ "$TAG" =~ ^v$VERSION-(alpha|beta)$ ]]; then
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "is-prerelease=true" >> $GITHUB_OUTPUT
else
Expand Down Expand Up @@ -105,7 +106,10 @@ jobs:
- name: Bundle
shell: bash
run: |
if [[ "${{ needs.version-and-tag.outputs.is-prerelease }}" == "true" ]]; then
TAG=${{ needs.version-and-tag.outputs.tag }}
if [[ "$TAG" =~ -alpha$ ]]; then
npm run bundle:alpha
elif [[ "$TAG" =~ -beta$ ]]; then
npm run bundle:beta
else
npm run bundle:prod
Expand All @@ -120,11 +124,20 @@ jobs:
shell: bash
run: |
APP_NAME=${{ needs.get-configs.outputs.app-name }}
VERSION=${{ needs.version-and-tag.outputs.tag }}
OS=${{ matrix.name }}
ARCH=${{ matrix.arch }}

ASSET_NAME="${APP_NAME}-${VERSION}-${OS}-${ARCH}.zip"
VERSION=$(node -p "require('./package.json').version")
OS=${{ runner.os }}
ARCH=${{ runner.arch }}

TAG=${{ needs.version-and-tag.outputs.tag }}
if [[ "$TAG" =~ -alpha$ ]]; then
FILE_NAME="${APP_NAME}-${VERSION}-alpha-${OS}-${ARCH}.zip"
elif [[ "$TAG" =~ -beta$ ]]; then
FILE_NAME="${APP_NAME}-${VERSION}-beta-${OS}-${ARCH}.zip"
else
FILE_NAME="${APP_NAME}-${VERSION}-${OS}-${ARCH}.zip"
fi

ASSET_NAME=$(echo "$FILE_NAME" | tr '[:upper:]' '[:lower:]')
echo "ASSET_NAME=${ASSET_NAME}"
echo "ASSET_NAME=${ASSET_NAME}" >> $GITHUB_OUTPUT

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function createPlugins(isDevelopment, outputPath, mode, env) {
fs.writeFileSync(path.join(tmpDir, 'package.json'), JSON.stringify(tmpPkg, null, 2));
fs.copyFileSync('package-lock.json', `${tmpDir}/package-lock.json`);

execSync('npm ci', { cwd: tmpDir, stdio: 'inherit' });
execSync('npm ci --only=prod', { cwd: tmpDir, stdio: 'inherit' });
callback();
} catch (error) {
callback(error);
Expand Down
Loading