diff --git a/.github/workflows/test-publish-for-branch.yml b/.github/workflows/test-publish-for-branch.yml new file mode 100644 index 00000000..f517d1a5 --- /dev/null +++ b/.github/workflows/test-publish-for-branch.yml @@ -0,0 +1,73 @@ +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: 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: + 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