chore: add MIT license #1
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-please | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| # Maintains a "chore: release X.Y.Z" PR from conventional commits. Merging | |
| # that PR bumps the version, tags it, and cuts a GitHub Release. | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # Only runs on the push that merges the release PR (release_created == true). | |
| # Builds the release binary and attaches it to the fresh Release. Linux only. | |
| upload-binaries: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created == 'true' }} | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| env: | |
| TARGET: x86_64-unknown-linux-gnu | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-gnu | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libasound2-dev \ | |
| libwayland-dev \ | |
| libxkbcommon-dev \ | |
| pkg-config | |
| - name: Build | |
| run: cargo build --release --locked --target "$TARGET" | |
| - name: Package | |
| shell: bash | |
| run: | | |
| bin=ut | |
| staging="${bin}-${{ needs.release-please.outputs.tag_name }}-${TARGET}" | |
| mkdir "$staging" | |
| cp "target/${TARGET}/release/${bin}" "$staging/" | |
| cp README.md LICENSE "$staging/" | |
| tar czf "$staging.tar.gz" "$staging" | |
| echo "ASSET=$staging.tar.gz" >> "$GITHUB_ENV" | |
| - name: Upload to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release upload "${{ needs.release-please.outputs.tag_name }}" "$ASSET" --clobber |