This commit is contained in:
yazninja 2023-05-10 09:50:20 +03:00
parent d23b8c037b
commit 9ce7d12417
2 changed files with 2 additions and 166 deletions

View file

@ -1,166 +0,0 @@
version: 2.1
executors:
cider-ci:
docker:
- image: cimg/node:lts-browsers
working_directory: ~/Cider
orbs: # Add orbs to your configuration
gh: circleci/github-cli@2.1
# The jobs for this project
jobs:
prepare-build:
executor: cider-ci
steps:
- checkout
- run:
name: Fetch Application Version
command: ./resources/version.sh || true
- run:
name: Initialize Submodules
command: git submodule update --init --recursive
- run:
name: Install Node Dependencies
command: npm run bootstrap
- run:
name: TypeScript Compile
command: npm run build
- persist_to_workspace:
root: .
paths:
- .git
- src
- node_modules
- build
- resources
- package.json
- winget.json
- LICENSE
build-linux:
docker:
- image: electronuserland/builder:wine
steps:
- attach_workspace:
at: ~/project
- run:
name: Generate Builds (Linux)
command: yarn electron-builder -l -p never
- persist_to_workspace:
root: .
paths:
- dist/*.deb
- dist/*.AppImage
- dist/*.snap
- dist/latest-linux.yml
build-windows:
docker:
- image: electronuserland/builder:wine
steps:
- attach_workspace:
at: ~/project
- run:
name: Generate Builds (Windows)
command: yarn electron-builder -w --x64 -p never
- persist_to_workspace:
root: .
paths:
- dist/*.exe
- dist/Cider-Setup-*.exe.blockmap
- dist/latest.yml
build-winget:
docker:
- image: electronuserland/builder:wine
steps:
- attach_workspace:
at: ~/project
- run:
name: Generate Builds (Winget)
command: yarn electron-builder --win -c winget.json -p never
- persist_to_workspace:
root: .
paths:
- dist/*.exe
- dist/Cider-Setup-winget-*.exe.blockmap
release:
executor: cider-ci
steps:
- attach_workspace:
at: ~/Cider/
- gh/install
- run:
name: Move Build Files
command: |
mkdir ~/Cider/dist/artifacts/
mv ~/Cider/dist/*.exe ~/Cider/dist/artifacts
mv ~/Cider/dist/*.deb ~/Cider/dist/artifacts
mv ~/Cider/dist/*.AppImage ~/Cider/dist/artifacts
mv ~/Cider/dist/*.snap ~/Cider/dist/artifacts
mv ~/Cider/dist/*.yml ~/Cider/dist/artifacts
mv ~/Cider/dist/*.blockmap ~/Cider/dist/artifacts
- store_artifacts:
path: ~/Cider/dist/artifacts
- run:
name: Run Version Script
command: |
sudo chmod +x resources/version.sh && NO_WRITE_VER=true ./resources/version.sh || true
- run:
name: Publish Release
command: |
echo "Attempting to create release for Cider v${RELEASE_VERSION} on the ${CIRCLE_BRANCH} branch.";
if [[ "${APP_VERSION}" = *"beta"* ]]; then
echo $'**Beta Release**\nA full changelog is unavailable, but you can view the branch comparison [here](https://github.com/ciderapp/cider/compare/stable...main).\nThese builds are considered bleeding edge, expect bugs and please do not use this as a representation of the fu ll app.\nOur full support disclaimer can be found [here](https://docs.cider.sh/support/disclaimer#support-nightly-beta-releases).' > release-notes.md
gh release create "v${RELEASE_VERSION}" --prerelease --title "Cider Version ${APP_VERSION} (${CIRCLE_BRANCH})" --notes-file release-notes.md -R ciderapp/cider-releases ~/Cider/dist/artifacts/*.deb ~/Cider/dist/artifacts/*.AppImage ~/Cider/dist/artifacts/*.snap ~/Cider/dist/artifacts/*.exe ~/Cider/dist/artifacts/*.yml ~/Cider/dist/artifacts/*.blockmap
else
echo $'**Stable Release**\nA full changelog is unavailable, but you can view the branch comparison [here](https://github.com/ciderapp/cider/compare/stable...main).\nThese are the most stable builds we can provide. If you experience any issues, please report them [here](https://github.com/ciderapp/cider/issues/new).\nOur full support disclaimer can be found [here](https://docs.cider.sh/support/disclaimer#support-releases).' > release-notes.md
gh release create "v${RELEASE_VERSION}" --title "Cider Version ${APP_VERSION} (${CIRCLE_BRANCH})" --notes-file release-notes.md -R ciderapp/cider-releases ~/Cider/dist/artifacts/*.deb ~/Cider/dist/artifacts/*.AppImage ~/Cider/dist/artifacts/*.snap ~/Cider/dist/artifacts/*.exe ~/Cider/dist/artifacts/*.yml ~/Cider/dist/artifacts/*.blockmap
fi;
# Orchestrate our job run sequence
workflows:
build_and_release:
jobs:
- prepare-build:
filters:
branches:
only:
- main
- stable
- build-windows:
requires:
- prepare-build
filters:
branches:
only:
- main
- stable
- build-linux:
requires:
- prepare-build
filters:
branches:
only:
- main
- stable
- build-winget:
requires:
- prepare-build
filters:
branches:
only:
- main
- stable
- release:
requires:
- build-windows
- build-linux
- build-winget
filters:
branches:
only:
- main
- stable

2
.gitignore vendored
View file

@ -328,3 +328,5 @@ savedconfig/session.json
savedconfig/window-state.json
src/main/base/sample.json
# yeet circleci ci for now
.circleci/