Skip to content

Commit

Permalink
- name: Test A
Browse files Browse the repository at this point in the history
        if: ${{ steps.changeset-status.outputs.skip != true }}
        run: |
          echo "Show A"

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip

refactor(changeset-cicd): 💡TIAS skip
  • Loading branch information
heldrida committed Jun 26, 2024
1 parent 2c5d1b3 commit 44efc0e
Showing 1 changed file with 79 additions and 49 deletions.
128 changes: 79 additions & 49 deletions .github/workflows/changeset-version-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,60 +50,90 @@ jobs:
echo "skip=$skip" >> "$GITHUB_OUTPUT"
- name: Get pnpm store directory
if: ${{ steps.changeset-status.outputs.skip != 'true' }}
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
if: ${{ steps.changeset-status.outputs.skip != 'true' }}
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
if: ${{ steps.changeset-status.outputs.skip != 'true' }}
- name: TIAS skip
run: |
pnpm install \
--strict-peer-dependencies
echo "Test 1"
test1=${{ steps.changeset-status.outputs.skip }}
if [[ "$test1" == 'true' ]]; then
echo "its quoted true"
fi
if [[ "$test1" == 'false' ]]; then
echo "its quoted false"
fi
echo "Test 2"
if [[ "$test1" == true ]]; then
echo "its true"
fi
if [[ "$test1" == false ]]; then
echo "its false"
fi
- name: Set version
if: ${{ steps.changeset-status.outputs.skip != 'true' }}
- name: Test A
if: ${{ steps.changeset-status.outputs.skip != true }}
run: |
pnpm changeset:version
git status --short
echo "Show A"
- name: Commit changes
- name: Test B
if: ${{ steps.changeset-status.outputs.skip != 'true' }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
echo "Show B"
# - name: Get pnpm store directory
# if: ${{ steps.changeset-status.outputs.skip != 'true' }}
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

# - uses: actions/cache@v4
# if: ${{ steps.changeset-status.outputs.skip != 'true' }}
# name: Setup pnpm cache
# with:
# path: ${{ env.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-

# - name: Install dependencies
# if: ${{ steps.changeset-status.outputs.skip != 'true' }}
# run: |
# pnpm install \
# --strict-peer-dependencies

# - name: Set version
# if: ${{ steps.changeset-status.outputs.skip != 'true' }}
# run: |
# pnpm changeset:version
# git status --short

# - name: Commit changes
# if: ${{ steps.changeset-status.outputs.skip != 'true' }}
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"

if ! git add -A; then
echo "👹 Oops! Failed stage changes"
exit 1
fi
echo "✅ Staged all changes!"
pkgVersion=$(node -p "require('./package.json').version")
if ! git commit \
--allow-empty \
--no-verify \
-m "[skip ci] 🦖 updated package version to $pkgVersion"; then
echo "👹 Oops! Failed to commit package version."
exit 1
fi
echo "✅ Committed package version!"
if ! git push; then
echo "👹 Oops! Failed to push changes."
exit 1
fi
echo "✅ Pushed changes to repository!"
# if ! git add -A; then
# echo "👹 Oops! Failed stage changes"
# exit 1
# fi

# echo "✅ Staged all changes!"

# pkgVersion=$(node -p "require('./package.json').version")
# if ! git commit \
# --allow-empty \
# --no-verify \
# -m "[skip ci] 🦖 updated package version to $pkgVersion"; then
# echo "👹 Oops! Failed to commit package version."
# exit 1
# fi

# echo "✅ Committed package version!"

# if ! git push; then
# echo "👹 Oops! Failed to push changes."
# exit 1
# fi

# echo "✅ Pushed changes to repository!"

0 comments on commit 44efc0e

Please sign in to comment.