mirror of
https://github.com/tgdrive/teldrive.git
synced 2024-09-20 08:15:55 +08:00
ci: add circle ci
This commit is contained in:
parent
5ea8bbf4d5
commit
889a0c31dd
46
.circleci/build.yml
Normal file
46
.circleci/build.yml
Normal 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: /.*/
|
Loading…
Reference in a new issue