Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 13 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: test

on: [pull_request]
on:
push:
branches:
- crate
pull_request:

permissions:
contents: read

jobs:
test:
Expand All @@ -14,11 +21,11 @@ jobs:
runs-on: ${{ matrix.platform.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.platform.target }}

- name: install webkit2gtk (ubuntu only)
Expand All @@ -27,47 +34,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1

- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Cache cargo registry
uses: actions/cache@v2.1.4
with:
path: ~/.cargo/registry
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform }}-stable-cargo-registry-

- name: Cache cargo index
uses: actions/cache@v2.1.4
with:
path: ~/.cargo/git
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform }}-stable-cargo-index-

- name: Cache cargo target
uses: actions/cache@v2
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform }}-stable-cargo-core-
- uses: Swatinem/rust-cache@v2

- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: build javascriptcore
run: cargo build --target ${{ matrix.platform.target }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: covector status
on: [pull_request]

permissions:
contents: read

jobs:
covector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: covector status
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- crate

permissions:
# required to create the GitHub Release
contents: write
# required for creating the Version Packages Release
pull-requests: write

jobs:
version-or-publish:
runs-on: ubuntu-latest
Expand All @@ -15,7 +21,7 @@ jobs:
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: cargo login
Expand All @@ -28,15 +34,14 @@ jobs:
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
createRelease: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: tauri-apps/create-pull-request@v3
uses: peter-evans/create-pull-request@v8.1.1
if: steps.covector.outputs.commandRan == 'version'
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -45,3 +50,4 @@ jobs:
labels: "version updates"
branch: "release"
body: ${{ steps.covector.outputs.change }}
sign-commits: true