Skip to content

Commit

Permalink
chore: release gh action and mops info
Browse files Browse the repository at this point in the history
  • Loading branch information
ilbertt committed Oct 18, 2023
1 parent 473cda6 commit 19c550b
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 3 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release ic-websocket-cdk-mo

# only run when the tests complete
on:
workflow_run:
workflows: [ic-websocket-cdk-mo 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:
version: ${{ steps.npm-publish.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- uses: aviate-labs/[email protected]
with:
dfx-version: 0.14.1
env:
DFX_IDENTITY_PEM: ${{ secrets.DFX_IDENTITY_PEM }}

- name: install mops
run: npm i ic-mops -g

- run: |
dfx identity use action
mops import-identity -- "$(dfx identity export action)"
mops publish
echo "version=v$(cat mops.toml | grep "version =" | cut -d\" -f2)" >> "$GITHUB_OUTPUT"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
tag:
needs: publish
runs-on: ubuntu-latest
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 }}
6 changes: 3 additions & 3 deletions mops.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "ic-websocket-cdk"
version = "0.0.1"
version = "0.1.0"
description = "IC WebSocket Motoko CDK"
repository = ""
keywords = [ ]
repository = "https://github.com/omnia-network/ic-websocket-cdk-mo"
keywords = ["ic", "websocket", "motoko", "cdk"]
license = "MIT"

[dependencies]
Expand Down

0 comments on commit 19c550b

Please sign in to comment.