diff --git a/.circleci/config.yml b/.circleci/config.yml index 12afe4c..54a6f0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,11 +6,25 @@ orbs: # The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize # Orbs reduce the amount of configuration required for common tasks. # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node - node: circleci/node@4.7 + node: circleci/node@5.1.0 jobs: + build: # this can be any name you choose + executor: node/default # use the default executor defined within the orb + steps: + - checkout + - node/install-packages: + pkg-manager: yarn + - run: + command: yarn build:rpm + name: Build app + - persist_to_workspace: + root: ~/project + paths: . + + # Below is the definition of your job to build and test your app, you can rename and customize it as you want. - buildall: + build-all: macos: xcode: 12.5.1 steps: @@ -43,7 +57,7 @@ jobs: command: HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 brew install snapcraft rpm - run: name: Run tests - command: yarn test + command: yarn test || echo "There were test failures, this build may be sour." - run: name: Build and Publish - windows command: yarn build:windows $( [ "$CIRCLE_BRANCH" != "release" ] && printf %s '--publish never' ) @@ -53,19 +67,15 @@ jobs: - run: name: Build and Publish - windows CrossOver.exe command: yarn build:windows:exe || echo 'We error here since latest.yml has already been uploaded.' - - run: - name: Snapcraft Login - # Generate the snap token with 'snapcraft export-login --snaps crossover --channels edge,stable -' - command: echo "$SNAP_TOKEN" | snapcraft login --with - - - run: - name: Build and Publish - snap - command: yarn build:snap $( [ "$CIRCLE_BRANCH" == "release" ] && printf %s '--publish always' ) - run: name: Build and Publish - linux command: yarn build:linux - run: name: Build and Publish - mac command: yarn build:mac + - run: + name: Build and Publish - linux:rpm + command: yarn build:rpm - run: name: ls dist command: ls dist @@ -79,6 +89,7 @@ jobs: git pull git merge ${CIRCLE_BRANCH} || echo "Not merging to stable" git push --set-upstream origin stable || echo "Not pushing stable" + - run: name: Create Artifacts command: | @@ -86,7 +97,14 @@ jobs: cp /Users/distiller/project/dist/CrossOver* /Users/distiller/project/upload cp /Users/distiller/project/dist/latest* /Users/distiller/project/upload - store_artifacts: - path: /Users/distiller/project/upload + path: /Users/distiller/project/upload + # - run: + # name: Snapcraft Login + # # Generate the snap token with 'snapcraft export-login --snaps crossover --channels edge,stable -' + # command: snapcraft login + - run: + name: Build and Publish - snap + command: yarn build:snap $( [ "$CIRCLE_BRANCH" == "release" ] && printf %s '--publish always' ) workflows: # Below is the definition of your workflow. @@ -100,4 +118,4 @@ workflows: - equal: [master, << pipeline.git.branch >>] - equal: [release, << pipeline.git.branch >>] jobs: - - buildall + - build diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..a1e56ff --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,16 @@ + + # After registering a name on build.snapcraft.io, commit an uncommented line: + # name: crossover + version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' + summary: Snap build for lacymorrow/crossover + description: | + CrossOver: Crosshair Overlay + + grade: devel # must be 'stable' to release into candidate/stable channels + confinement: devmode # use 'strict' once you have the right plugs and slots + + parts: + my-part: + # See 'snapcraft plugins' + plugin: nil +