chore: gitignore copilot instructions #3
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 RC | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: | |
| - version-1.0-rc | |
| jobs: | |
| release-rc: | |
| name: Release RC to crates.io | |
| runs-on: macos-15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Verify version is RC | |
| run: | | |
| VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') | |
| echo "Version: $VERSION" | |
| if [[ ! "$VERSION" =~ -rc ]]; then | |
| echo "Error: Version must contain '-rc' suffix for RC releases" | |
| exit 1 | |
| fi | |
| - name: Build and test | |
| run: | | |
| cargo build --release | |
| cargo test | |
| - name: Publish to crates.io | |
| run: cargo publish --allow-dirty | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ env.VERSION }} | |
| name: Release Candidate v${{ env.VERSION }} | |
| body: | | |
| This is a release candidate version. | |
| Install with: `cargo add screencapturekit@${{ env.VERSION }}` | |
| prerelease: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VERSION: ${{ steps.get-version.outputs.version }} |