diff --git a/.github/workflows/release-multichannelchat.yml b/.github/workflows/release-multichannelchat.yml index 7887bd6..6ac8bb5 100644 --- a/.github/workflows/release-multichannelchat.yml +++ b/.github/workflows/release-multichannelchat.yml @@ -22,31 +22,25 @@ jobs: - multi-channel-chat/nats-channel include: - working-directory: multi-channel-chat/api-gateway - artifact-name: api-gateway + artifact-name: mcc-api-gateway + wash-key: AWESOME_COSMONIC_MCC_APIGATEWAY_KEY - working-directory: multi-channel-chat/chatlog - artifact-name: chatlog + artifact-name: mcc-chatlog + wash-key: AWESOME_COSMONIC_MCC_CHATLOG_KEY - working-directory: multi-channel-chat/http-channel - artifact-name: http-channel + artifact-name: mcc-http-channel + wash-key: AWESOME_COSMONIC_MCC_HTTPCHANNEL_KEY - working-directory: multi-channel-chat/nats-channel - artifact-name: nats-channel + artifact-name: mcc-nats-channel + wash-key: AWESOME_COSMONIC_MCC_NATSCHANNEL_KEY steps: - uses: actions/checkout@v3 - uses: wasmcloud/common-actions/install-wash@main - name: Add wasm32-unknown-unknown run: rustup target add wasm32-unknown-unknown - - name: Set wash subject key (api-gateway) - if: ${{ matrix.artifact-name == 'api-gateway' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_APIGATEWAY_KEY }}" > $GITHUB_ENV - - name: Set wash subject key (chatlog) - if: ${{ matrix.artifact-name == 'chatlog' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_CHATLOG_KEY }}" > $GITHUB_ENV - - name: Set wash subject key (http-channel) - if: ${{ matrix.artifact-name == 'http-channel' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_HTTPCHANNEL_KEY }}" > $GITHUB_ENV - - name: Set wash subject key (nats-channel) - if: ${{ matrix.artifact-name == 'nats-channel' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_NATSCHANNEL_KEY }}" > $GITHUB_ENV + - name: Set wash subject key + run: echo "WASH_SUBJECT_KEY=${{ secrets[matrix.wash-key] }}" > $GITHUB_ENV - name: Build and sign wasmCloud actor env: @@ -74,13 +68,13 @@ jobs: - multi-channel-chat/nats-channel include: - working-directory: multi-channel-chat/api-gateway - artifact-name: api-gateway + artifact-name: mcc-api-gateway - working-directory: multi-channel-chat/chatlog - artifact-name: chatlog + artifact-name: mcc-chatlog - working-directory: multi-channel-chat/http-channel - artifact-name: http-channel + artifact-name: mcc-http-channel - working-directory: multi-channel-chat/nats-channel - artifact-name: nats-channel + artifact-name: mcc-nats-channel steps: - uses: actions/checkout@v3 - uses: wasmcloud/common-actions/install-wash@main @@ -94,20 +88,14 @@ jobs: echo "actor-name=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name')" >> $GITHUB_ENV working-directory: ${{ matrix.working-directory }} - name: Determine actor version - if: startswith(github.ref, 'refs/tags/') # Only run on tag push run: | echo "actor-version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version')" >> $GITHUB_ENV working-directory: ${{ matrix.working-directory }} - - name: Determine actor version (main) - if: ${{ !startswith(github.ref, 'refs/tags/') }} - run: | - echo "actor-version=latest" >> $GITHUB_ENV - working-directory: ${{ matrix.working-directory }} - name: Push actor to AzureCR uses: wasmcloud/common-actions/oci-artifact-release@main with: artifact-path: ${{ matrix.working-directory }}/build/${{ env.actor-name }}_s.wasm - oci-url: ${{ secrets.AZURECR_PUSH_URL }} + oci-url: ${{ secrets.AZURECR_PUSH_URL }} oci-repository: ${{ env.actor-name }} oci-version: ${{ env.actor-version }} oci-username: ${{ secrets.COSMONIC_AZURECR_PUSH_USER }} diff --git a/multi-channel-chat/api-gateway/Cargo.toml b/multi-channel-chat/api-gateway/Cargo.toml index 9975f7c..22f02ec 100644 --- a/multi-channel-chat/api-gateway/Cargo.toml +++ b/multi-channel-chat/api-gateway/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "apigateway" +name = "mcc-api-gateway" version = "0.1.0" authors = [ "Cosmonic Team" ] edition = "2021" [lib] crate-type = ["cdylib", "rlib"] -name = "apigateway" +name = "mcc-api-gateway" [dependencies] async-trait = "0.1" diff --git a/multi-channel-chat/chatlog/Cargo.toml b/multi-channel-chat/chatlog/Cargo.toml index fff5ec3..c32df44 100644 --- a/multi-channel-chat/chatlog/Cargo.toml +++ b/multi-channel-chat/chatlog/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "chatlog" +name = "mcc-chatlog" version = "0.1.0" authors = [ "Cosmonic Team" ] edition = "2021" diff --git a/multi-channel-chat/http-channel/Cargo.toml b/multi-channel-chat/http-channel/Cargo.toml index df292f5..f3d8b32 100644 --- a/multi-channel-chat/http-channel/Cargo.toml +++ b/multi-channel-chat/http-channel/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "httpchannel" +name = "mcc-http-channel" version = "0.1.0" authors = [ "Cosmonic Team" ] edition = "2021" [lib] crate-type = ["cdylib", "rlib"] -name = "httpchannel" +name = "mcc-http-channel" [dependencies] async-trait = "0.1" diff --git a/multi-channel-chat/multi-channel-chat.wadm.yaml b/multi-channel-chat/multi-channel-chat.wadm.yaml new file mode 100644 index 0000000..1a1aebe --- /dev/null +++ b/multi-channel-chat/multi-channel-chat.wadm.yaml @@ -0,0 +1 @@ +# WIP \ No newline at end of file diff --git a/multi-channel-chat/nats-channel/Cargo.toml b/multi-channel-chat/nats-channel/Cargo.toml index 85a0356..c3e88e1 100644 --- a/multi-channel-chat/nats-channel/Cargo.toml +++ b/multi-channel-chat/nats-channel/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "natschannel" +name = "mcc-nats-channel" version = "0.1.0" authors = [ "Cosmonic Team" ] edition = "2021" [lib] crate-type = ["cdylib", "rlib"] -name = "natschannel" +name = "mcc-nats-channel" [dependencies] async-trait = "0.1"