Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 1.0.0-beta.2 #5

Merged
merged 8 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 115 additions & 115 deletions .github/release.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,115 +1,115 @@
name: Create Release
run-name: ${{ github.actor }} releases: 1.0.0-beta.2
on:
pull_request:
branches:
- main
types: [closed]
jobs:
build:
name: Archive and Build
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 缓存依赖
uses: actions/cache@v4
with:
path: |
~/.npm
.next/cache
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: 安装依赖
run: npm install
- name: 构建应用
run: npm run build
- name: 归档应用(不包含 node_modules)
run: |
mkdir aigc-masonry
cd aigc-masonry
cp -r ../.next .next
cp -r ../public public
cp -r ../prisma prisma
cp ../package.json package.json
cp ../package-lock.json package-lock.json
cp ../next.config.mjs next.config.mjs
cp ../.env .env
cp ../README.md README.md
cp ../LICENSE LICENSE
- name: 归档应用(包含 node_modules)
run: |
mkdir aigc-masonry-full
cd aigc-masonry-full
cp -r ../.next .next
cp -r ../public public
cp -r ../prisma prisma
cp ../package.json package.json
cp ../package-lock.json package-lock.json
cp ../next.config.mjs next.config.mjs
cp ../.env .env
cp ../README.md README.md
cp ../LICENSE LICENSE
npm install --omit=dev
npx prisma db push
rm -rf prisma
- name: 检出归档文件(不包含 node_modules)
run: ls -al aigc-masonry
- name: 检出归档文件(包含 node_modules)
run: ls -al aigc-masonry-full
- name: 压缩归档文件(不包含 node_modules)
run: zip -r aigc-masonry.zip aigc-masonry
- name: 压缩归档文件(包含 node_modules)
run: zip -r aigc-masonry-full.zip aigc-masonry-full
- name: 创建发布包
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 1.0.0-beta.2
release_name: 1.0.0-beta.2
draft: true
prerelease: false
- name: 上传发布包(不包含 node_modules)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: aigc-masonry.zip
asset_name: aigc-masonry.zip
asset_content_type: application/zip
- name: 上传发布包(包含 node_modules)
id: upload-release-asset-full
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: aigc-masonry-full.zip
asset_name: aigc-masonry-full.zip
asset_content_type: application/zip
name: Create Release
run-name: ${{ github.actor }} releases 1.0.0-beta.2

on:
pull_request:
branches:
- main
types: [closed]

jobs:
build:
name: Archive and Build
runs-on: ubuntu-latest

if: github.event.pull_request.merged == true

steps:
- name: 检出代码
uses: actions/checkout@v4

- name: 缓存依赖
uses: actions/cache@v4
with:
path: |
~/.npm
.next/cache
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-

- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: 安装依赖
run: npm install

- name: 构建应用
run: npm run build

- name: 归档应用(不包含 node_modules)
run: |
mkdir aigc-masonry
cd aigc-masonry
cp -r ../.next .next
cp -r ../public public
cp -r ../prisma prisma
cp ../package.json package.json
cp ../package-lock.json package-lock.json
cp ../next.config.mjs next.config.mjs
cp ../.env .env
cp ../README.md README.md
cp ../LICENSE LICENSE

- name: 归档应用(包含 node_modules)
run: |
mkdir aigc-masonry-full
cd aigc-masonry-full
cp -r ../.next .next
cp -r ../public public
cp -r ../prisma prisma
cp ../package.json package.json
cp ../package-lock.json package-lock.json
cp ../next.config.mjs next.config.mjs
cp ../.env .env
cp ../README.md README.md
cp ../LICENSE LICENSE
npm install --omit=dev
npx prisma db push
rm -rf prisma

- name: 检出归档文件(不包含 node_modules)
run: ls -al aigc-masonry

- name: 检出归档文件(包含 node_modules)
run: ls -al aigc-masonry-full

- name: 压缩归档文件(不包含 node_modules)
run: zip -r aigc-masonry.zip aigc-masonry

- name: 压缩归档文件(包含 node_modules)
run: zip -r aigc-masonry-full.zip aigc-masonry-full

- name: 创建发布包
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 1.0.0-beta.2
release_name: 1.0.0-beta.2
draft: true
prerelease: false

- name: 上传发布包(不包含 node_modules)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: aigc-masonry.zip
asset_name: aigc-masonry.zip
asset_content_type: application/zip

- name: 上传发布包(包含 node_modules)
id: upload-release-asset-full
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: aigc-masonry-full.zip
asset_name: aigc-masonry-full.zip
asset_content_type: application/zip
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 timeto-code

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading