Create label.yml #31
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: | |
| branches: | |
| - master | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write # needed for creating releases | |
| packages: write # if you're also publishing packages | |
| jobs: | |
| release: | |
| if: ${{ github.repository_owner == 'your-ehsan' && startsWith(github.ref, 'refs/tags/v')}} | |
| name: Create a release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate Release Notes | |
| run: | | |
| pnpm add -g conventional-changelog-cli | |
| conventional-changelog -p angular -i CHANGELOG.md -s -r 0 | |
| - name: Build | |
| env: | |
| ELECTRON_BUILDER_ALLOWED_EXECUTABLES: '*' | |
| run: pnpm build:win | |
| - name: Verify Build Output | |
| shell: bash | |
| run: | | |
| if [ ! -f "dist/*.exe" ]; then | |
| echo "Build output not found!" | |
| exit 1 | |
| fi | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/*.exe | |
| dist/latest.yml | |
| body_path: CHANGELOG.md | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |