2020-06-06 14:50:28 -05:00
|
|
|
name: publish
|
|
|
|
on:
|
|
|
|
workflow_dispatch: # We can add version input when 1.0 is released and scheduled releases are removed
|
|
|
|
|
2020-08-31 10:35:26 -05:00
|
|
|
# schedule:
|
|
|
|
# - cron: "0 0 * * *" # midnight UTC
|
2020-06-06 14:50:28 -05:00
|
|
|
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: publish
|
2020-08-25 05:45:06 -05:00
|
|
|
runs-on: ubuntu-latest
|
2020-06-06 14:50:28 -05:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-04-30 15:56:03 -05:00
|
|
|
uses: actions/checkout@v3
|
2020-06-06 14:50:28 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
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"
|
|
|
|
rm Cargo.lock
|
|
|
|
cargo workspaces rename ra_ap_%n
|
2020-08-25 05:45:06 -05:00
|
|
|
find crates/rust-analyzer -type f -name '*.rs' -exec sed -i 's/rust_analyzer/ra_ap_rust_analyzer/g' {} +
|
2020-06-06 14:50:28 -05:00
|
|
|
cargo workspaces publish --yes --force '*' --exact --no-git-commit --allow-dirty --skip-published custom 0.0.$PATCH
|