chore(release): 发布 v0.2.7 #16
Workflow file for this run
This file contains hidden or 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: release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x64, arm64] | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: 'false' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm --workspace @paste/macos run dist -- --mac dmg zip --${{ matrix.arch }} | |
| - name: Normalize macOS update metadata filenames | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| cd apps/macos/dist-electron | |
| if [[ "${{ matrix.arch }}" == "arm64" ]]; then | |
| if [[ -f latest-mac.yml && ! -f latest-mac-arm64.yml ]]; then | |
| mv latest-mac.yml latest-mac-arm64.yml | |
| fi | |
| fi | |
| if [[ "${{ matrix.arch }}" == "x64" ]]; then | |
| if [[ -f latest-mac-x64.yml && ! -f latest-mac.yml ]]; then | |
| mv latest-mac-x64.yml latest-mac.yml | |
| fi | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-${{ matrix.arch }} | |
| path: | | |
| apps/macos/dist-electron/*.dmg | |
| apps/macos/dist-electron/*.zip | |
| apps/macos/dist-electron/*.blockmap | |
| apps/macos/dist-electron/latest*.yml | |
| windows: | |
| runs-on: windows-latest | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: 'false' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm --workspace @paste/macos run dist -- --win nsis zip --x64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-x64 | |
| path: | | |
| apps/macos/dist-electron/*.exe | |
| apps/macos/dist-electron/*.zip | |
| apps/macos/dist-electron/*.blockmap | |
| apps/macos/dist-electron/latest*.yml | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [macos, windows] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: dist/**/* |