--- name: CI 'on': push jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: include: - os: macos-latest CMD_BUILD: | brew install create-dmg poetry run make bundle_mac version=$GITHUB_REF_NAME PATH: | dist/buzz*.dmg dist/buzz*.tar.gz - os: windows-latest CMD_BUILD: | poetry run make bundle_windows version=$env:GITHUB_REF_NAME PATH: | dist/buzz*.tar.gz steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.10.6' - name: Install Poetry Action uses: snok/install-poetry@v1.3.1 with: virtualenvs-create: true virtualenvs-in-project: true - name: Load cached venv id: cached-poetry-dependencies uses: actions/cache@v3 with: path: .venv key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-2 - run: poetry install - run: ${{ matrix.CMD_BUILD }} - uses: actions/upload-artifact@v3 with: name: Buzz path: | ${{ matrix.PATH }} release: runs-on: ubuntu-latest needs: build if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/download-artifact@v3 with: name: Buzz - name: Release uses: softprops/action-gh-release@v1 with: files: | buzz*.tar.gz buzz*.dmg