pull/5370/head
bunsenstraat 10 months ago
parent 8c54fb8116
commit 94bdc657f7
  1. 34
      .circleci/config.yml
  2. 65
      apps/remix-ide/ci/update_desktop_release_assets.ts
  3. 2
      apps/remixdesktop/package.json

@ -125,7 +125,7 @@ jobs:
yarn add node-pty
yarn --ignore-optional
yarn add @remix-project/remix-ws-templates
PUBLISH_FOR_PULL_REQUEST='true' yarn dist
yarn dist
rm -rf release/*-unpacked
- save_cache:
key: remixdesktop-linux-deps-{{ checksum "apps/remixdesktop/yarn.lock" }}
@ -134,6 +134,10 @@ jobs:
- store_artifacts:
path: apps/remixdesktop/release/
destination: remixdesktop-linux
- persist_to_workspace:
root: apps/remixdesktop
paths:
- "release"
build-remixdesktop-windows:
executor:
@ -169,7 +173,7 @@ jobs:
cp -r dist/apps/remix-ide apps/remixdesktop/build
cd apps/remixdesktop/
yarn
PUBLISH_FOR_PULL_REQUEST='true' yarn dist
yarn dist
rm -rf release/*-unpacked
- save_cache:
key: remixdesktop-windows-deps-{{ checksum "apps/remixdesktop/yarn.lock" }}
@ -246,6 +250,10 @@ jobs:
- store_artifacts:
path: ~/remix-project/release/
destination: remixdesktop-windows
- persist_to_workspace:
root: ~/remix-project/
paths:
- "release"
environment:
SM_CLIENT_CERT_FILE: 'C:\Certificate_pkcs12.p12'
Signtool: 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe'
@ -289,14 +297,27 @@ jobs:
cd apps/remixdesktop
yarn
yarn installRipGrepMacOXarm64
PUBLISH_FOR_PULL_REQUEST='true' USE_HARD_LINKS=false yarn dist --mac --arm64
USE_HARD_LINKS=false yarn dist --mac --arm64
yarn installRipGrepMacOXx64
PUBLISH_FOR_PULL_REQUEST='true' USE_HARD_LINKS=false yarn dist --mac --x64
USE_HARD_LINKS=false yarn dist --mac --x64
rm -rf release/mac*
- store_artifacts:
path: apps/remixdesktop/release/
destination: remixdesktop-mac
- persist_to_workspace:
root: apps/remixdesktop
paths:
- "release"
uploadartifacts:
docker:
- image: cimg/node:20.0.0-browsers
resource_class:
xlarge
working_directory: ~/remix-project
steps:
- attach_workspace:
at: .
lint:
docker:
- image: cimg/node:20.0.0-browsers
@ -531,6 +552,11 @@ workflows:
- build-remixdesktop-linux:
requires:
- build-desktop
- uploadartifacts:
requires:
- build-remixdesktop-mac
- sign-remixdesktop-windows
- build-remixdesktop-linux
- build-plugin:
matrix:
parameters:

@ -0,0 +1,65 @@
import { Octokit } from 'octokit'
const owner = 'bunsenstraat'
const repo = 'remix-desktop'
const headers = {
'X-GitHub-Api-Version': '2022-11-28'
}
const octokit = new Octokit({
auth: process.env.GH_TOKEN
})
async function getAllReleases() {
const releases = await octokit.request('GET /repos/{owner}/{repo}/releases', {
owner: owner,
repo: repo,
headers: headers
})
return releases.data
}
async function getVersionFromPackageJson() {
const packageJson = require(__dirname + '/../../../apps/remixdesktop/package.json')
return packageJson.version
}
async function getReleaseByTag(tag_name: string) {
const releases = await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {
owner: owner,
repo: repo,
tag: tag_name,
headers: headers
})
return releases.data
}
async function getReleaseAssets(release_id: number) {
const assets = await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}/assets', {
owner: owner,
repo: repo,
release_id: release_id,
headers: headers
})
for (const asset of assets.data) {
console.log(asset.name)
}
}
async function main() {
const version = await getVersionFromPackageJson()
console.log(version)
const release = await getReleaseByTag('v' + version)
console.log(release)
if(!release.draft) {
console.log('Release is not a draft')
return
}
}
main()
console.log(process.env.GH_TOKEN)
//getReleaseAssets()

@ -24,7 +24,7 @@
"scripts": {
"start:dev": "tsc && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=development electron --inspect=5858 .",
"start:production": "tsc && && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=production electron .",
"dist": "tsc && cp -R node_modules/yarn build/tools/ && electron-builder",
"dist": "tsc && cp -R node_modules/yarn build/tools/ && electron-builder -p never",
"installRipGrepMacOXx64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=x64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"installRipGrepMacOXarm64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=arm64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"postinstall": "electron-builder install-app-deps"

Loading…
Cancel
Save