chore: make the clip size correct #172
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: Rust | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy rustfmt | |
| - name: Install wayland dependencies | |
| run: | | |
| pacman -Syu --noconfirm wayland base-devel mesa pango cairo | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose | |
| publish-crate: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:latest | |
| permissions: | |
| contents: write # required to create release | |
| id-token: write # required for OIDC token exchange | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy rustfmt | |
| - name: Install wayland dependencies | |
| run: | | |
| pacman -Syu --noconfirm wayland base-devel mesa pango cairo github-cli git | |
| - name: Obtain crates.io token | |
| uses: rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1.0.3 | |
| id: auth | |
| - name: Publish to crates.io | |
| run: cargo publish --workspace | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| github-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # required to create release | |
| id-token: write # required for OIDC token exchange | |
| needs: publish-crate | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: taiki-e/create-gh-release-action@56a8b3f8449593aa02b91f7b84da564f476e94f0 # v1.9.2 | |
| with: | |
| branch: master | |
| changelog: CHANGELOG.md | |
| draft: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish github release | |
| run: | | |
| if [[ $(echo "${GTIHUB_REF#refs/tags/v}" | grep '-' > /dev/null) ]]; then | |
| gh release edit "${GITHUB_REF#refs/tags/}" --prerelease | |
| fi | |
| gh release edit "${GITHUB_REF#refs/tags/}" --draft=false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |