Files
MCCustomSkinLoader/.github/workflows/beta.yml
T
2026-05-21 13:04:43 +08:00

70 lines
1.9 KiB
YAML

name: Beta
on:
push:
branches: [15-develop]
permissions:
contents: write
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- uses: ./.github/actions/build
with:
artifact-name: CustomSkinLoader-Beta-${{ github.run_number }}
publish:
name: Publish
needs: build
runs-on: windows-latest
environment: Build
env:
IS_SNAPSHOT: 'true'
R2_SECRET_ID: ${{ secrets.R2_SECRET_ID }}
R2_SECRET_KEY: ${{ secrets.R2_SECRET_KEY }}
R2_BUCKET: ${{ secrets.R2_BUCKET }}
R2_BASE_URL: ${{ secrets.R2_BASE_URL }}
COS_SECRET_ID: ${{ secrets.COS_SECRET_ID }}
COS_SECRET_KEY: ${{ secrets.COS_SECRET_KEY }}
COS_BUCKET: ${{ secrets.COS_BUCKET }}
steps:
- uses: actions/download-artifact@v4
with:
name: CustomSkinLoader-Beta-${{ github.run_number }}
path: artifact
- uses: ./.github/actions/publish
with:
artifact-dir: artifact
type: beta
- name: Generate CI-Build body
shell: pwsh
run: |
@"
Build Time / 构建时间 : $((Get-Date).ToUniversalTime().AddHours(8).ToString("yyyy.MM.dd HH:mm"))
Auto build from branch $env:GITHUB_REF_NAME
[How to use?](https://github.com/xfl03/MCCustomSkinLoader/wiki/How-to-Use)
"@ | Set-Content -Path ci-build-body.md -NoNewline
- name: Move CI-Build tag to current commit
uses: richardsimko/update-tag@v1
with:
tag_name: CI-Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: GitHub PreRelease
uses: softprops/action-gh-release@v2
with:
tag_name: CI-Build
name: CustomSkinLoader CI-Build
prerelease: true
body_path: ci-build-body.md
files: artifact/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}