⚓ Push #11
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: ⚓ Push | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
default: 0.0.1 | |
ref: | |
type: string | |
default: dev | |
jobs: | |
build-binary: | |
name: BuildBinary | |
permissions: | |
id-token: write | |
contents: write | |
attestations: write | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: dream-num/univer-desktop | |
ref: ${{ inputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: true | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- run: pnpm i | |
- run: | | |
cd app | |
pnpm version ${{ inputs.version }} --allow-same-version --no-git-tag-version | |
- name: Install appdmg | |
if: matrix.os == 'macos-latest' | |
run: pnpm add -g appdmg | |
- run: pnpm make | |
- uses: hexf00/upload-to-oss@v2 | |
with: | |
files: | | |
app/out/make/**/*.dmg | |
app/out/make/**/*.zip | |
app/out/make/**/*.exe | |
app/out/make/**/*.AppImage | |
app/out/make/**/*.yml | |
dest: test/staging/ | |
bucket: release-univer | |
region: oss-cn-shenzhen | |
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}} | |
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}} | |
timeout: 1200s | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-nightly | |
path: | | |
app/out/make/**/*.zip | |
app/out/make/**/*.exe | |
app/out/make/**/*.AppImage | |
app/out/make/**/*.yml | |
app/out/make/**/*.dmg | |
retention-days: 7 | |
- name: 签名 | |
continue-on-error: true | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: | | |
app/out/make/**/*.dmg | |
app/out/make/**/*.zip | |
app/out/make/**/*.exe | |
app/out/make/**/*.AppImage | |
app/out/make/**/*.yml | |
- name: Create Nightly Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Nightly ${{ inputs.version }} | |
draft: false | |
prerelease: true | |
tag_name: ${{ inputs.version }} | |
files: | | |
app/out/make/**/*.dmg | |
app/out/make/**/*.zip | |
app/out/make/**/*.exe | |
app/out/make/**/*.AppImage | |
app/out/make/**/*.yml | |
body: | | |
This is an automated nightly release for testing purposes. | |
Version: ${{ inputs.version }} | |
**Warning:** This build may be unstable and is not recommended for production use. |