Skip to content

Add assets directory. Update CI. Add asset and src extensions #83

Add assets directory. Update CI. Add asset and src extensions

Add assets directory. Update CI. Add asset and src extensions #83

Workflow file for this run

name: Pre-release
on:
pull_request:
branches:
- "main"
types: [opened,labeled,edited,synchronize]
jobs:
test-artifacts:
if: contains(github.event.pull_request.labels.*.name, 'release')
env:
RUST_BACKTRACE: 1
RUST_LIB_BACKTRACE: 1
TOKIO_WORKER_THREADS: 1
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
command: test
- target: x86_64-apple-darwin
os: macos-latest
command: test
- target: aarch64-apple-darwin
os: macos-latest
command: build
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: Cross-compile
run: cargo ${{ matrix.command }} --locked --target ${{ matrix.target }}
publish-dry-run:
if: contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to crates.io
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Dry run of crate publish
run: cargo publish -p depot-js --dry-run
check-pr-name:
if: contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
steps:
- name: Check that PR name is a release number
run: echo "${{ github.event.pull_request.title }}" | grep -q -E "^v[0-9]+\.[0-9]+\.[0-9]+$"