Skip to content

Commit

Permalink
added publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oberblastmeister committed May 20, 2021
1 parent 6e80d77 commit b0b6e3b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: publish
on:
workflow_dispatch:

push:
branches:
- release

jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
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 la_ap_%n
find crates/lua-analyzer -type f -name '*.rs' -exec sed -i 's/lua_analyzer/la_ap_lua_analyzer/g' {} +
cargo workspaces publish --yes --force '*' --exact --no-git-commit --allow-dirty --skip-published custom 0.0.$PATCH

0 comments on commit b0b6e3b

Please sign in to comment.