Merge branch 'workflow' into develop
This commit is contained in:
82
.github/workflows/release.yml
vendored
Normal file
82
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Release VRCT
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # タグが 'v' で始まる場合にトリガー (例: v1.0.0)
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build VRCT
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.15.0'
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Set up Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Setup Python environment
|
||||
run: npm run setup-python
|
||||
|
||||
- name: Install Python script dependencies
|
||||
run: pip install tqdm
|
||||
|
||||
- name: Build and package
|
||||
run: npm run release-all
|
||||
|
||||
- name: Get version from tag
|
||||
id: get_version
|
||||
shell: pwsh
|
||||
run: |
|
||||
$TAG_WITH_V = $env:GITHUB_REF -replace "^refs/tags/", ""
|
||||
$VERSION_NUM = $TAG_WITH_V -replace "^v", ""
|
||||
echo "VERSION=$VERSION_NUM" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Upload to Hugging Face Hub
|
||||
env:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
run: |
|
||||
pip install huggingface_hub
|
||||
huggingface-cli upload ms-software/VRCT VRCT.zip VRCT.zip --repo-type dataset --commit-message "👍️[Update] ${{ env.VERSION }} Release"
|
||||
huggingface-cli upload ms-software/VRCT VRCT_cuda.zip VRCT_cuda.zip --repo-type dataset --commit-message "👍️[Update] ${{ env.VERSION }} Release"
|
||||
|
||||
- name: Create GitHub Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ env.VERSION }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset (NSIS Installer)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./src-tauri/target/release/bundle/nsis/VRCT_${{ env.VERSION }}_x64-setup.exe
|
||||
asset_name: VRCT_${{ env.VERSION }}_x64-setup.exe
|
||||
asset_content_type: application/octet-stream
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "VRCT",
|
||||
"version": "3.0.0",
|
||||
"version": "3.2.0",
|
||||
"identifier": "com.vrct.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "",
|
||||
|
||||
Reference in New Issue
Block a user