mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-28 19:55:20 +08:00
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
##
|
|
## Auto-opens a PR on the clarity-js-sdk repo to update the binary reference when a new release is published.
|
|
##
|
|
|
|
name: Open Clarity JS SDK PR
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
CLARITY_JS_SDK_REPOSITORY: stacks-network/clarity-js-sdk
|
|
COMMIT_USER: Hiro DevOps
|
|
COMMIT_EMAIL: 45208873+blockstack-devops@users.noreply.github.com
|
|
on:
|
|
release:
|
|
types:
|
|
- released
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
run:
|
|
name: Open Clarity JS SDK PR
|
|
runs-on: ubuntu-latest
|
|
# This condition can be removed once the main `stacks-core` workflow creates pre-releases
|
|
# when appropriate, instead of full releases for every tag passed in.
|
|
if: "!contains(github.ref, '-rc')"
|
|
steps:
|
|
- name: Checkout latest clarity js sdk
|
|
id: git_checkout
|
|
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
|
|
with:
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
repository: ${{ env.CLARITY_JS_SDK_REPOSITORY }}
|
|
ref: master
|
|
|
|
- name: Determine Release Version
|
|
id: get_release_version
|
|
run: |
|
|
RELEASE_VERSION=$(echo ${GITHUB_REF#refs/*/} | tr / -)
|
|
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
|
|
|
|
- name: Update SDK Tag
|
|
id: update_sdk_tag
|
|
run: sed -i "s@CORE_SDK_TAG = \".*\"@CORE_SDK_TAG = \"$RELEASE_VERSION\"@g" packages/clarity-native-bin/src/index.ts
|
|
|
|
- name: Create Pull Request
|
|
id: create_pr
|
|
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
|
with:
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
commit-message: "chore: update clarity-native-bin tag"
|
|
committer: ${{ env.COMMIT_USER }} <${{ env.COMMIT_EMAIL }}>
|
|
author: ${{ env.COMMIT_USER }} <${{ env.COMMIT_EMAIL }}>
|
|
branch: auto/update-bin-tag
|
|
delete-branch: true
|
|
title: "clarity-native-bin tag update: ${{ env.RELEASE_VERSION }}"
|
|
labels: |
|
|
dependencies
|
|
body: |
|
|
:robot: This is an automated pull request created from a new release in [stacks-core](https://github.com/stacks-network/stacks-core/releases).
|
|
|
|
Updates the clarity-native-bin tag.
|
|
assignees: zone117x
|
|
reviewers: zone117x
|