From c39f0bb90a9cc18f3a114a9e0fb7b12851724058 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Thu, 4 May 2023 09:05:19 +0300 Subject: [PATCH 1/2] Publishing test --- .github/workflows/test-publish-for-branch.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test-publish-for-branch.yml diff --git a/.github/workflows/test-publish-for-branch.yml b/.github/workflows/test-publish-for-branch.yml new file mode 100644 index 00000000..5affb374 --- /dev/null +++ b/.github/workflows/test-publish-for-branch.yml @@ -0,0 +1,39 @@ +name: Cratesio Publish +on: + workflow_dispatch: + + pull_request: + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Publishing redismodule-rs-macros-internals + uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + path: './redismodule-rs-macros-internals' + args: --allow-dirty + dry-run: true + + - name: Publishing redismodule-rs + uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + args: --allow-dirty + dry-run: true + + - name: Publishing redismodule-rs-macros + uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + path: './redismodule-rs-macros' + args: --allow-dirty + dry-run: true From 39dbec951f97d1b1037ab661c15922d74f5ae370 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Thu, 4 May 2023 09:41:18 +0300 Subject: [PATCH 2/2] fake version, for the test --- .github/workflows/test-publish-for-branch.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/test-publish-for-branch.yml b/.github/workflows/test-publish-for-branch.yml index 5affb374..f517d1a5 100644 --- a/.github/workflows/test-publish-for-branch.yml +++ b/.github/workflows/test-publish-for-branch.yml @@ -15,6 +15,40 @@ jobs: toolchain: stable override: true + - name: get version from tag + id: set a fake version + run: | + echo "::set-output name=VERSION::8.9.10" + + - name: Set the version for publishing + uses: ciiiii/toml-editor@1.0.0 + with: + file: "Cargo.toml" + key: "package.version" + value: "${{ steps.get_version.outputs.VERSION }}" + + - name: Set the version for redismodule-rs-macros-internals + uses: ciiiii/toml-editor@1.0.0 + with: + file: "Cargo.toml" + key: "dependencies.redis-module-macros-internals" + value: "${{ steps.get_version.outputs.VERSION }}" + + - name: Set the version for publishing on macros crate + uses: ciiiii/toml-editor@1.0.0 + with: + file: "redismodule-rs-macros/Cargo.toml" + key: "package.version" + value: "${{ steps.get_version.outputs.VERSION }}" + + - name: Set the version for publishing on internal macros crate + uses: ciiiii/toml-editor@1.0.0 + with: + file: "redismodule-rs-macros-internals/Cargo.toml" + key: "package.version" + value: "${{ steps.get_version.outputs.VERSION }}" + + - name: Publishing redismodule-rs-macros-internals uses: katyo/publish-crates@v1 with: