Skip to content

chore(deps-dev): bump tsdown from 0.22.3 to 0.22.14 #62

chore(deps-dev): bump tsdown from 0.22.3 to 0.22.14

chore(deps-dev): bump tsdown from 0.22.3 to 0.22.14 #62

Workflow file for this run

name: Release
on:
push:
branches:
- master
# 仅针对当前工作流正在进行的作业或运行
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false # Release 作业不取消,因为要确保版本发布成功
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write # Required for OIDC
packages: write
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup Node.js environment
uses: actions/setup-node@v7
with:
node-version: "lts/*"
cache: "pnpm"
- run: pnpm i --frozen-lockfile
- run: pnpm run typecheck
- run: pnpm run lint
- run: pnpm run test
- run: pnpm run build
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run release
# 发布到 docker
- name: Get git tag
id: git_tag
run: |
GIT_TAG=$(git describe --tags --exact-match HEAD 2>/dev/null || true)
echo "tag=$GIT_TAG" >> ${GITHUB_OUTPUT}
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.5.2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v4.5.2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Alibaba Cloud Container Registry
uses: docker/login-action@v4.5.2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIYUN_USERNAME }}
password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Extract Docker metadata
id: metadata
uses: docker/metadata-action@v6
with:
# 发布到 docker.io / ghcr.io / registry.cn-hangzhou.aliyuncs.com
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
registry.cn-hangzhou.aliyuncs.com/${{ github.repository }}
tags: |
type=semver,priority=1100,pattern={{version}},value=${{ steps.git_tag.outputs.tag }},enable=true
type=raw,value=latest,enable=true
type=raw,value={{date 'YYYY-MM-DD' tz='Asia/Shanghai'}},enable=true
type=sha,format=short,prefix=sha-,enable=true
flavor: latest=false
- name: Build and push Docker images
uses: docker/build-push-action@v7
# 如果有 GIT_TAG ,就发布
if: ${{ steps.git_tag.outputs.tag != '' }}
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max