chore: remove release cleanup workflow #42
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: Build and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' # Trigger on tags like v1.0.0 | |
| jobs: | |
| release: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build and Package (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: npm run dist | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and Package (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: npm run dist | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CSC_IDENTITY_AUTO_DISCOVERY: false | |
| - name: Build and Package (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: npm run dist | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Artifacts (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SSHTool-Windows | |
| path: | | |
| release-new/*.exe | |
| release-new/*.zip | |
| retention-days: 7 | |
| - name: Upload Artifacts (macOS) | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SSHTool-macOS | |
| path: | | |
| release-new/*.dmg | |
| release-new/*.zip | |
| retention-days: 7 | |
| - name: Upload Artifacts (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SSHTool-Linux | |
| path: | | |
| release-new/*.AppImage | |
| release-new/*.tar.gz | |
| retention-days: 7 | |
| # Automatically publish a Release when a tag is pushed | |
| - name: Release to GitHub | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| release-new/*.exe | |
| release-new/*.dmg | |
| release-new/*.AppImage | |
| release-new/*.zip | |
| release-new/*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |