Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing test, both on PR and manually available #325

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/test-publish-for-branch.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
file: "Cargo.toml"
key: "package.version"
value: "${{ steps.get_version.outputs.VERSION }}"

- name: Set the version for redismodule-rs-macros-internals
uses: ciiiii/[email protected]
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/[email protected]
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/[email protected]
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