Skip to content

Publish ic-websocket-cdk-rs #1

Publish ic-websocket-cdk-rs

Publish ic-websocket-cdk-rs #1

Workflow file for this run

name: Release ic-websocket-cdk-rs
# only run when the tests complete
on:
workflow_run:
workflows: [ic-websocket-cdk-rs tests]
types:
- completed
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
# only run if the tests were successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
exit_code: ${{ steps.npm-publish.outputs.exit_code }}
version: ${{ steps.npm-publish.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- run: |
cargo publish -p ic-websocket-cdk
EXIT_CODE=$?
echo "exit_code=$EXIT_CODE" >> "$GITHUB_OUTPUT"
echo "version=v$(cargo pkgid -p ic-websocket-cdk | cut -d# -f2 | cut -d: -f2)" >> "$GITHUB_OUTPUT"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
tag:
needs: publish
runs-on: ubuntu-latest
if: ${{ needs.publish.outputs.exit_code == "0" }}

Check failure on line 39 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release ic-websocket-cdk-rs

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 39, Col: 9): Unexpected symbol: '"0"'. Located at position 36 within expression: needs.publish.outputs.exit_code == "0"
outputs:
version: ${{ steps.tag_version.outputs.new_tag }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ needs.publish.outputs.version }}
release:
needs: tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.tag.outputs.version }}