ci: add circle ci

This commit is contained in:
divyam234 2024-08-11 23:46:21 +05:30
parent 5ea8bbf4d5
commit 889a0c31dd

46
.circleci/build.yml Normal file
View file

@ -0,0 +1,46 @@
version: '2.1'
jobs:
release:
docker:
- image: cimg/go:1.22.6-node
steps:
- setup_remote_docker:
version: default
- run:
name: Install pnpm package manager
command: |
sudo corepack enable
sudo corepack prepare pnpm@latest-9 --activate
- checkout
- run:
name: Build UI
command: |
git clone https://github.com/divyam234/teldrive-ui
cd teldrive-ui
pnpm install --frozen-lockfile
export VITE_SERVER_VERSION=$CIRCLE_TAG
pnpm run build
cd ..
mv teldrive-ui/dist ui/dist
rm -rf teldrive-ui
- run:
name: Release
command: |
docker login --username $DOCKER_LOGIN --password $DOCKER_PASSWORD ghcr.io
export DOCKER_CLI_EXPERIMENTAL=enabled
export GITHUB_TOKEN=$DOCKER_PASSWORD
docker buildx create --name multiarch --driver docker-container --use
curl -sfL https://goreleaser.com/static/run | bash
docker logout ghcr.io
workflows:
main:
jobs:
- release:
context: github-credentials
filters:
branches:
ignore: /.*/
tags:
only: /.*/