add more logs #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Coinfello Skill | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'coinfello/**' | |
| - 'package.json' | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Extract version | |
| run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
| - name: Generate changelog | |
| run: | | |
| PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") | |
| if [ -n "$PREV_TAG" ]; then | |
| CHANGELOG=$(git log "${PREV_TAG}..HEAD" --oneline --no-merges | head -20 | tr '\n' '; ') | |
| else | |
| CHANGELOG="Release v${VERSION}" | |
| fi | |
| echo "CHANGELOG=${CHANGELOG}" >> $GITHUB_ENV | |
| - name: Login to ClawHub | |
| run: pnpm exec clawhub login --token ${{ secrets.CLAWHUB_TOKEN }} --no-browser | |
| - name: Publish coinfello skill to ClawHub | |
| run: | | |
| pnpm exec clawhub publish ./coinfello \ | |
| --slug coinfello \ | |
| --name "CoinFello" \ | |
| --version "$VERSION" \ | |
| --changelog "$CHANGELOG" |