Skip to content

Commit

Permalink
1. Add client info into verification email;
Browse files Browse the repository at this point in the history
2. Add client name where the clipboard data from to the log;
3.Build images against amd64 & arm64.
4. Optimized the document.
  • Loading branch information
llaoj committed May 1, 2024
1 parent 7900e2a commit 090185a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 32 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
name: Tag & build
name: Build images

on:
push:
branches:
- main
paths:
- version.txt
tags:
- 'v[0-9].[0-9]+.[0-9]+**'

jobs:
tag:
if: ${{ github.repository == 'llaoj/gcopy' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: /usr/bin/git config --global user.email [email protected]
- run: /usr/bin/git config --global user.name 'GitHub Actions Release Tagger'
- run: hack/release-tag.sh
id: release_tag
outputs:
release_tag: ${{ steps.release_tag.outputs.release_tag }}

build:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VERSION=$(shell cat version.txt)
TAG?=$(VERSION)

# REGISTRY is the container registry to push into.
REGISTRY?=registry.cn-beijing.aliyuncs.com/llaoj
REGISTRY?=docker.io/llaoj

# PKG is the package name of gcopy repo.
PKG:=github.com/llaoj/gcopy
Expand All @@ -30,7 +30,7 @@ GOARCH ?= amd64

version:
@echo $(VERSION)
cd frontend && npm version $(VERSION) && npm run prettier && cd ..
cd frontend && npm version $(VERSION) --allow-same-version && npm run prettier && cd ..

vet:
go list -tags "" ./... | grep -v "./vendor/*" | xargs go vet -tags ""
Expand Down
1 change: 1 addition & 0 deletions build/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ COPY frontend/.env.sample .env.production

RUN apk add --no-cache libc6-compat
RUN npm config delete proxy
RUN npm ci
RUN npm run build

FROM base AS runner
Expand Down
16 changes: 8 additions & 8 deletions hack/release-tag.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -xe
#!/bin/bash -e

VERSION=$(cat version.txt)

Expand All @@ -7,12 +7,12 @@ if [[ ! "${VERSION}" =~ ^v([0-9]+[.][0-9]+)[.]([0-9]+)(-(alpha|beta)[.]([0-9]+))
exit 1
fi

if [ "$(git tag -l "${VERSION}")" ]; then
echo "Tag ${VERSION} already exists"
exit 1
fi
# if [ "$(git tag -l "${VERSION}")" ]; then
# echo "Tag ${VERSION} already exists"
# exit 1
# fi

git tag -a -m "Release ${VERSION}" "${VERSION}"
git push origin "${VERSION}"
git tag -f -a -m "Release ${VERSION}" "${VERSION}"
git push origin -f "${VERSION}"

echo "release_tag=refs/tags/${VERSION}" >> "$GITHUB_OUTPUT"
echo "release_tag=refs/tags/${VERSION}"

0 comments on commit 090185a

Please sign in to comment.