bc7d84c3ce
* a rule * access * after * amount * annotations * assignment * assist * associated * attribute * borrowed * built-in type * clarification * command * const * constructor * corresponding * counterparts * curlies * dependencies * deterministic * diagnostic * duplicates * edge * edited * efficient * elsewhere * execution * expression * extensions * extracted * fill * github * helper * heuristic * incomplete * indent end * inlay * invocation * lifetime * looking * maybe * move * mutability * mutable * necessarily * necessary * negative * nonexistent * occurred * offsets * offsetted * overridden * parameters * params * params_and_where_preds_in_scope * paredit * parent * parentheses * prepended if * punctuation * receive * receiver * referring * repeated * representing * semantically * separately * shouldnot * siblings * similar * something's * statement * struct * structure * surprise * the * this * transparent * unimplemented * unnamed * unnecessary * unneeded * unreachable * unterminated * utilities * variant * variants * visibility * work around (v) * workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
57 lines
2.2 KiB
YAML
57 lines
2.2 KiB
YAML
name: autopublish
|
|
on:
|
|
workflow_dispatch: # We can add version input when 1.0 is released and scheduled releases are removed
|
|
|
|
# schedule:
|
|
# - cron: "0 0 * * *" # midnight UTC
|
|
|
|
push:
|
|
branches:
|
|
- release
|
|
|
|
jobs:
|
|
publish:
|
|
name: publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Rust toolchain
|
|
run: rustup update --no-self-update stable
|
|
|
|
- name: Install cargo-workspaces
|
|
run: cargo install cargo-workspaces
|
|
|
|
- name: Publish Crates
|
|
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"
|
|
rm Cargo.lock
|
|
# Fix names for crates that were published before switch to kebab-case.
|
|
cargo workspaces rename --from base-db base_db
|
|
cargo workspaces rename --from hir-def hir_def
|
|
cargo workspaces rename --from hir-expand hir_expand
|
|
cargo workspaces rename --from hir-ty hir_ty
|
|
cargo workspaces rename --from ide-assists ide_assists
|
|
cargo workspaces rename --from ide-completion ide_completion
|
|
cargo workspaces rename --from ide-db ide_db
|
|
cargo workspaces rename --from ide-diagnostics ide_diagnostics
|
|
cargo workspaces rename --from ide-ssr ide_ssr
|
|
cargo workspaces rename --from proc-macro-api proc_macro_api
|
|
cargo workspaces rename --from proc-macro-srv proc_macro_srv
|
|
cargo workspaces rename --from project-model project_model
|
|
cargo workspaces rename --from test-utils test_utils
|
|
cargo workspaces rename --from text-edit text_edit
|
|
cargo workspaces rename ra_ap_%n
|
|
# Remove library crates from the workspaces so we don't auto-publish them as well
|
|
sed -i 's/ "lib\/\*",//' ./Cargo.toml
|
|
find crates/rust-analyzer -type f -name '*.rs' -exec sed -i 's/rust_analyzer/ra_ap_rust_analyzer/g' {} +
|
|
cargo workspaces publish --yes --force '*' --exact --no-git-commit --allow-dirty --skip-published custom 0.0.$PATCH
|