From 632c68e42cff1d4b15722bed922e7fb31fc6258a Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Tue, 21 Feb 2023 15:16:54 +0100 Subject: [PATCH] Add an action to publish the grammar automatically --- .github/workflows/publish_crate.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish_crate.yml diff --git a/.github/workflows/publish_crate.yml b/.github/workflows/publish_crate.yml new file mode 100644 index 000000000..cec684b5d --- /dev/null +++ b/.github/workflows/publish_crate.yml @@ -0,0 +1,33 @@ +name: Publish on crates.io + +on: + push: + tags: + - v* + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + publish: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Rust stable + run: | + rustup toolchain install stable --profile minimal --no-self-update + + - name: Verify publish crate + uses: katyo/publish-crates@v1 + with: + dry-run: true + + - name: Publish crate + uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}