Browse Source

cargo workspaces fixes #2001 (#2026)

This adds cargo-workspaces to our repo for easier publishing. 
(I think we may need to do a dry run of this first to test)

fixes https://github.com/boa-dev/boa/issues/2001
pull/2047/head
Jason Williams 3 years ago
parent
commit
01bd50fa72
  1. 40
      .github/workflows/release.yml
  2. 3
      Cargo.toml
  3. 1
      boa_examples/Cargo.toml
  4. 1
      boa_tester/Cargo.toml
  5. 1
      boa_wasm/Cargo.toml

40
.github/workflows/release.yml

@ -4,18 +4,34 @@ on:
types: [published] types: [published]
jobs: jobs:
# publish: publish:
# runs-on: ubuntu-latest name: publish
# steps: runs-on: ubuntu-latest
# - name: Git Checkout steps:
# uses: actions/checkout@v3 - name: Checkout repository
# - name: Publish to crates.io uses: actions/checkout@v3
# uses: actions-rs/cargo@v1
# with: - name: Install Rust toolchain
# command: publish uses: actions-rs/toolchain@v1
# args: -p boa_engine --token ${CARGO_REGISTRY_TOKEN} with:
# env: toolchain: stable
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} profile: minimal
override: true
- name: Install cargo-workspaces
uses: actions-rs/install@v0.1
with:
crate: cargo-workspaces
- name: Release
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
PATCH: ${{ github.run_number }}
shell: bash
run: |
git config --global user.email "runner@gha.local"
git config --global user.name "Github Action"
cargo workspaces publish --yes minor
doc-publish: doc-publish:
# needs: publish # needs: publish
runs-on: ubuntu-latest runs-on: ubuntu-latest

3
Cargo.toml

@ -11,6 +11,9 @@ members = [
"boa_examples", "boa_examples",
] ]
[workspace.metadata.workspaces]
allow_branch = "main"
# The release profile, used for `cargo build --release`. # The release profile, used for `cargo build --release`.
[profile.release] [profile.release]
# Enables "fat" LTO, for faster release builds # Enables "fat" LTO, for faster release builds

1
boa_examples/Cargo.toml

@ -5,6 +5,7 @@ authors = ["boa-dev"]
repository = "https://github.com/boa-dev/boa" repository = "https://github.com/boa-dev/boa"
license = "Unlicense/MIT" license = "Unlicense/MIT"
edition = "2021" edition = "2021"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

1
boa_tester/Cargo.toml

@ -9,6 +9,7 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "ECMASCript", "compiler", "test262", "tester"] keywords = ["javascript", "ECMASCript", "compiler", "test262", "tester"]
categories = ["command-line-utilites"] categories = ["command-line-utilites"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
publish = false
[dependencies] [dependencies]
boa_engine = { path = "../boa_engine", version = "0.14.0" } boa_engine = { path = "../boa_engine", version = "0.14.0" }

1
boa_wasm/Cargo.toml

@ -9,6 +9,7 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "compiler", "lexer", "parser", "js"] keywords = ["javascript", "compiler", "lexer", "parser", "js"]
categories = ["parser-implementations", "wasm", "compilers"] categories = ["parser-implementations", "wasm", "compilers"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
publish = false
[dependencies] [dependencies]
boa_engine = { path = "../boa_engine", features = ["console"], version = "0.14.0" } boa_engine = { path = "../boa_engine", features = ["console"], version = "0.14.0" }

Loading…
Cancel
Save