Merge pull request #25 from devlopersabbir/sabbir #17
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/🚀 Release Electron App | |
| on: | |
| push: | |
| branches: ["main"] | |
| tags: | |
| - v*.*.* # 🔖 Only run on version tags like v0.0.2 | |
| jobs: | |
| release: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: 🔄 Check out Git repository | |
| uses: actions/checkout@v3 | |
| - name: 📦 Install Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: 📥 Install Dependencies | |
| run: npm install | |
| working-directory: desktop | |
| # 🐧 Linux Build | |
| - name: 🐧 Build for Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| run: npm run build:linux | |
| working-directory: desktop | |
| # 🍎 macOS Build | |
| - name: 🍎 Build for macOS | |
| if: matrix.os == 'macos-latest' | |
| run: npm run build:mac | |
| working-directory: desktop | |
| # 🪟 Windows Build | |
| - name: 🪟 Build for Windows | |
| if: matrix.os == 'windows-latest' | |
| run: npm run build:win | |
| working-directory: desktop | |
| # 📜 Extract changelog for the current version tag | |
| - name: 📝 Extract changelog for current tag | |
| id: extract_changelog | |
| run: | | |
| TAG_NAME=${{ github.ref_name }} | |
| awk "/## ${TAG_NAME}/,/^## v[0-9]+\.[0-9]+\.[0-9]+/" changelog.md | sed '$d' > changelog.txt | |
| shell: bash | |
| - name: 👀 Show extracted changelog | |
| run: cat changelog.txt | |
| # 🚀 Publish GitHub Release with Assets and Changelog | |
| - name: 🚀 Publish GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| if: github.ref_type == 'tag' | |
| with: | |
| body_path: changelog.txt | |
| repository: devlopersabbir/executeme | |
| token: ${{ secrets.EXECUTE_ME_GITHUB_TOKEN }} | |
| files: | | |
| desktop/dist/*.exe | |
| desktop/dist/*.zip | |
| desktop/dist/*.dmg | |
| desktop/dist/*.AppImage | |
| desktop/dist/*.snap | |
| desktop/dist/*.deb | |
| desktop/dist/*.rpm | |
| desktop/dist/*.tar.gz | |
| desktop/dist/*.yml | |
| desktop/dist/*.blockmap | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.EXECUTE_ME_GITHUB_TOKEN }} |