Change when release workflow runs #31
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 Freeze Release with PyInstaller and fpm | |
| on: | |
| push: | |
| tags: | |
| - v0.1.** | |
| branches: | |
| - 'main' | |
| - 'releases/**' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.9" | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.7 | |
| - name: Add Ruby to PATH | |
| run: | | |
| echo "$HOME/.gem/ruby/2.7.0/bin" >> "$GITHUB_PATH" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install PyInstaller | |
| gem install dotenv -v 2.8.1 | |
| gem install fpm --user-install | |
| - name: Build with PyInstaller | |
| run: pyinstaller pyinstaller.spec --noconfirm | |
| - name: Package | |
| run: bash package.sh | |
| - name: fpm | |
| run: fpm -C package -s dir -t deb -n "imcapp" -v ${{ github.ref_name }} -p imcapp.deb | |
| - name: Generate Changelog | |
| run: cat CHANGELOG.txt > ${{ github.workspace }}-CHANGELOG.txt | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| draft: true | |
| files: imcapp.deb | |
| body_path: ${{ github.workspace }}-CHANGELOG.txt | |
| token: ${{ secrets.GITHUB_TOKEN }} |