Skip to content

chore(deps): update rust crate scraper to 0.26.0 #59

chore(deps): update rust crate scraper to 0.26.0

chore(deps): update rust crate scraper to 0.26.0 #59

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
name: Lint & Test
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: clippy, rustfmt
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Check format
run: cargo fmt -- --check
- name: Lint with Clippy
run: cargo clippy -- -D warnings
- name: Run Tests
run: cargo test
release:
name: Semantic Release
needs: tests
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
issues: write
pull-requests: write
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- name: Generate Token
id: generate_token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
with:
tag_format: v${version}
branches: |
['main']
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/github
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
conventional-changelog-conventionalcommits
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
build:
name: Build / ${{ matrix.os }}
needs: release
runs-on: ${{ matrix.os }}
if: needs.release.outputs.new_release_published == 'true'
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: pvm
asset_name: pvm-linux-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: pvm
asset_name: pvm-macos-aarch64
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: pvm
asset_name: pvm-macos-x86_64
steps:
- name: Generate Token
id: generate_token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: v${{ needs.release.outputs.new_release_version }}
token: ${{ steps.generate_token.outputs.token }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
targets: ${{ matrix.target }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: ${{ matrix.target }}
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}
- name: Create tar.gz archive
shell: bash
run: tar -C target/${{ matrix.target }}/release -czf ${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
- name: Upload to Release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
with:
tag_name: v${{ needs.release.outputs.new_release_version }}
files: ${{ matrix.asset_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}