release: 更新版本号 #157
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build/Release" | |
on: | |
push: | |
tags: | |
- "v*" | |
paths-ignore: | |
- "**.md" | |
- "**.spec.js" | |
- ".idea" | |
- ".vscode" | |
- ".dockerignore" | |
- "Dockerfile" | |
- ".gitignore" | |
- ".github/**" | |
- "!.github/workflows/release.yml" | |
defaults: | |
run: | |
shell: "bash" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check pre-release | |
uses: actions-ecosystem/action-regex-match@v2 | |
id: pre-release | |
with: | |
text: ${{ github.ref_name }} | |
regex: "(alpha)|(beta)|(rc)" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
# prerelease: ${{ steps.pre-release.outputs.match != '' }} | |
# draft: true | |
build: | |
# see more environment https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
needs: release | |
runs-on: ${{ matrix.os }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_OPTIONS: "--max_old_space_size=6144" | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ["18"] | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
arch: ["x64", "arm64"] | |
steps: | |
- name: Enable long path support on windows | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build app | |
run: pnpm run make --arch=${{ matrix.arch }} | |
- name: Publish to mirrors | |
run: pnpm run publish --arch=${{ matrix.arch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MAA_MINIO_ACCESS_KEY: ${{ secrets.MAA_MINIO_ACCESS_KEY }} | |
MAA_MINIO_SECRET_KEY: ${{ secrets.MAA_MINIO_SECRET_KEY }} |